Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docker [2016/01/20 11:59] – Link to app containers and OS level virtualization page, link to docker homepage TonyNarlock | docker [2022/10/21 01:44] (current) – Tweak runj description text KubilayKocak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Docker on FreeBSD ====== | ====== Docker on FreeBSD ====== | ||
| - | {{ docker/ | + | Docker is a popular container tool and ecosystem, comparable to [[Containers|FreeBSD |
| - | [[https:// | + | * [[https:// |
| - | ===== Status ===== | + | Work is currently in-progress to develop a [[Containers# |
| - | Docker on %%FreeBSD%% | + | runj is officially supported by containerd, supports |
| - | The [[https:// | + | ====== Contact ====== |
| - | ===== Requirements ===== | + | * [[https:// |
| + | * IRC: # | ||
| - | %%FreeBSD%% 11-CURRENT from July, 2015 or newer, specificially, | + | ====== Past Work ====== |
| - | ===== Repository ===== | + | A %%FreeBSD%% Docker port was originally made available in 2015, relying on [[ZFS]], [[Jails]] and 64bit support for the Linux compatibility layer introduced in June that year. A //genuine// Docker, it supported containers from the official [[https:// |
| - | [[https:// | + | * [[https:// |
| + | * [[https:// | ||
| + | * [[https:// | ||
| - | ==== Creation of < | + | At last update, Docker (docker-freebsd port) was [[https:// |
| - | + | ||
| - | The following steps allocate a 4G ZFS root file system using a raw disk, it allows you to test quickly. | + | |
| < | < | ||
| - | # kldload zfs | + | .gopath/src/github.com/docker/docker/pkg/system/mknod.go:12:22: cannot use dev |
| - | # dd if=/dev/zero of=/usr/local/dockerfs bs=1024K count=4000 | + | (type int) as type uint64 in argument to syscall.Mknod |
| - | # zpool create -f zroot /usr/local/ | + | |
| - | # zfs list | + | |
| - | NAME USED AVAIL REFER MOUNTPOINT | + | |
| - | zroot 55K 3.75G 19K /zroot | + | |
| - | # zpool list | + | |
| - | NAME SIZE ALLOC | + | |
| - | zroot 3.88G 11.8M 3.86G | + | |
| - | # zfs create -o mountpoint=/ | + | |
| </ | </ | ||
| + | |||
| + | A [[https:// | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | Limitations of the 64bit Linux compatibility subsystem will impact some Linux ABI containers and your testing and feedback is appreciated to help resolve any such issues. | ||
| + | |||
| + | %%FreeBSD%% 11.1-RELEASE or newer, specifically any version after [[https:// | ||
| ===== Installation and Use ===== | ===== Installation and Use ===== | ||
| Line 58: | Line 59: | ||
| You will need to create a ZFS dataset on /usr/docker | You will need to create a ZFS dataset on /usr/docker | ||
| - | # zfs create -o mountpoint=/ | + | # zfs create -o mountpoint=/ |
| And lastly enable the docker daemon | And lastly enable the docker daemon | ||
| Line 65: | Line 66: | ||
| </ | </ | ||
| - | Follow | + | If you're not already using ZFS, you will need to [[# |
| + | |||
| + | ==== Using Docker as a normal user ==== | ||
| + | |||
| + | In order to use Docker as a non-root/ | ||
| < | < | ||
| - | # service docker onestart | + | # pw usermod <you> -G operator |
| - | Starting docker... | + | </ |
| - | # docker version | + | After changing your user's group membership, log out and back in. Once logged back in '' |
| + | |||
| + | < | ||
| + | % docker version | ||
| Client version: 1.7.0-dev | Client version: 1.7.0-dev | ||
| Client API version: 1.19 | Client API version: 1.19 | ||
| Line 83: | Line 91: | ||
| OS/Arch (server): freebsd/ | OS/Arch (server): freebsd/ | ||
| - | # docker search centos | + | % docker search centos |
| NAME DESCRIPTION | NAME DESCRIPTION | ||
| centos | centos | ||
| Line 89: | Line 97: | ||
| ... | ... | ||
| - | # docker pull centos | + | % docker pull centos |
| latest: Pulling from centos | latest: Pulling from centos | ||
| - | f1b10cd84249: | + | f1b10cd84249: |
| - | c852f6d61e65: | + | c852f6d61e65: |
| - | 7322fbe74aa5: | + | 7322fbe74aa5: |
| centos: | centos: | ||
| Digest: sha256: | Digest: sha256: | ||
| Status: Downloaded newer image for centos: | Status: Downloaded newer image for centos: | ||
| - | # docker images | + | % docker images |
| REPOSITORY | REPOSITORY | ||
| centos | centos | ||
| - | # docker run -t -i centos /bin/bash | + | % docker run -t -i centos /bin/bash |
| [root@ /]# uname -a | [root@ /]# uname -a | ||
| Linux 2.6.32 FreeBSD 11.0-CURRENT #5 r285594: Tue Jul 14 23:30:11 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux | Linux 2.6.32 FreeBSD 11.0-CURRENT #5 r285594: Tue Jul 14 23:30:11 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux | ||
| Line 110: | Line 118: | ||
| < | < | ||
| - | # docker ps | + | % docker ps |
| CONTAINER ID IMAGE | CONTAINER ID IMAGE | ||
| 920bc5fbb45c | 920bc5fbb45c | ||
| Line 133: | Line 141: | ||
| devfs on / | devfs on / | ||
| ... | ... | ||
| + | </ | ||
| + | |||
| + | ==== Creation of a ZFS root using raw disk ==== | ||
| + | |||
| + | <callout type=" | ||
| + | These steps are only necessary if you're not already using ZFS. | ||
| + | </ | ||
| + | |||
| + | The following steps allocate a 4G ZFS root file system using a raw disk, it allows you to test quickly. | ||
| + | |||
| + | < | ||
| + | # kldload zfs | ||
| + | # dd if=/ | ||
| + | # zpool create -f zroot / | ||
| + | # zfs list | ||
| + | NAME USED AVAIL REFER MOUNTPOINT | ||
| + | zroot 55K 3.75G 19K /zroot | ||
| + | # zpool list | ||
| + | NAME SIZE ALLOC | ||
| + | zroot 3.88G 11.8M 3.86G | ||
| + | # zfs create -o mountpoint=/ | ||
| </ | </ | ||
| Line 189: | Line 218: | ||
| The " | The " | ||
| - | |||
| - | < | ||
| - | docker run -t -i centos /bin/bash | ||
| - | jail: name cannot be numeric (unless it is the jid | ||
| - | </ | ||
| - | |||
| - | See [[https:// | ||
| ===== Related ===== | ===== Related ===== | ||
| Line 207: | Line 229: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| ==== FreeBSD on Docker Hub ==== | ==== FreeBSD on Docker Hub ==== | ||
| - | * https:// | + | * [[https:// |
| - | * https:// | + | * [[https:// |
| - | * https:// | + | * [[https:// |
| ==== FreeBSD Docker on News and Article ==== | ==== FreeBSD Docker on News and Article ==== | ||
| Line 219: | Line 242: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | {{tag> | ||
| + | {{tag> | ||