# Docker-freebsd inside jail



## PeterSprague (Sep 11, 2016)

Has anyone succeeded in running docker inside a jail?  ZFS snapshots, having only data volumes and docker containers that pertain together, isolated from host system, ... ?

I'm experimenting with docker-freebsd on a 10.3 host.  The Docker version is considerably behind the Linux current version, but it mostly works on the host.  When I attempt to start docker-freebsd installed from pkgs in an iocage jail, it won't start. 

Spun up a 11.0-RC2 host, installed linux_base-c7, iocage create debian-jail, debootstrap debian jessie into debian-jail, but Linux version <3.10 as required for docker linux install.

Next option would be to run docker on a Atomic bhyve VM.  Anyone experimented with that route?  Initial go at getting an Atomic VM spun up was a fail.

Peter


----------



## grehan@ (Sep 12, 2016)

Easiest way to get Atomic booted/installed is with bhyve/UEFI, vnc, and a quick run through of the anaconda installer e.g.

`# create an empty hard-drive image
truncate -s 20G /images/centos7-atomic-1607.img  # or however large you want that to be

# assuming tap0 already setup, and the Atomic iso downloaded from 
# http://cloud.centos.org/centos/7/atomic/images/CentOS-Atomic-Host-7.1607-Installer.iso

bhyve \
 -c 2 \
 -s 0,hostbridge \
 -s 3,ahci-cd,/images/CentOS-Atomic-Host-7.1607-Installer.iso \
 -s 4,ahci-hd,/images/centos7-atomic-1607.img \
 -s 10,virtio-net,tap0 \
 -s 11,fbuf,tcp=0.0.0.0:5900,wait \
 -s 20,xhci,tablet \
 -s 31,lpc \
 -l bootrom,/images/BHYVE_UEFI_20160526.fd \
 -A -H -m 2G atomic`

Remove the 'ahci-cd' line on first boot post-install to force boot off the hard drive.


----------

