Skip to content
/ Jailer Public

Docker like container/jail management for FreeBSD jails

License

Notifications You must be signed in to change notification settings

NeoBSD/Jailer

Repository files navigation

Jailer

TLDR

The goal of Jailer is to solve the same problems that Docker solved on Linux, but for FreeBSD. Imagine a project where next to your already existing Dockerfile you have a Jailerfile, which can be used to start a FreeBSD jail running your installed & configurated application.

Warning

This software is in it's infancy. Use at your own risk. Have fun.

Status

License Unit test Coverage Issues
License Unittest codecov GitHub issues

Quick Start

Jailerfile

A jail can be described in a Jailerfile. The goal is to keep the syntax as similar to a Dockerfile as possible.

Example:

FROM freebsd
RUN echo "Hello Jailer!"

Supported commands

Not all commands are implemented yet. Most commands need to run as root:

Usage:
  jailer [flags]
  jailer [command]

Available Commands:
  build       Build an image from a Jailerfile
  config      Print current config
  dev         Subcommand for development only
  exec        Execute a command inside an existing jail
  fetch       Fetch base from FreeBSD mirror
  help        Help about any command
  info        Display system-wide information
  init        Init for jailer. Creates zfs datasets
  ps          List active jails
  restart     Restart one or more jails
  rm          Remove one or more jails
  run         Run a command in a new jail
  start       Start one or more stopped jails
  stop        Stop one or more running jails
  storage     Manages jail & image storage
  top         Run top inside a jail
  version     Print current version

Flags:
  -c, --config string   Config file (default is $PWD/jailer.yaml)
  -h, --help            help for jailer
  -v, --verbose         Verbose output

Use "jailer [command] --help" for more information about a command.

Development

Dependencies

  • FreeBSD 12.1
    • ZFS
  • Go (tested with 1.13)
    • Cobra
    • Viper
    • Logrus
  • gmake

Setup

cp jailer.example.yml jailer.yml
zfs create -o mountpoint=/jailer $ZROOT/jailer

Resources

Internal

External

Releases

No releases published

Packages

No packages published