Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docker [2017/08/12 01:03] – Suggest/prefer running Docker commands as a non-superuser. RTylerCroydocker [2022/10/21 01:44] (current) – Tweak runj description text KubilayKocak
Line 1: Line 1:
 ====== Docker on FreeBSD ====== ====== Docker on FreeBSD ======
  
-[[https://www.docker.com/|Docker]] is a popular [[AppContainers|application containment environment]] on GNU/Linux that is available on %%FreeBSD%% as of June, 2015. Docker on %%FreeBSD%% relies heavily on [[ZFS]], jail and the 64bit Linux compatibility layer that was introduced in June, 2015. Docker on %%FreeBSD%% is //genuine Docker// and retrieves containers from the official [[https://www.docker.io|docker.io]] repository. Consult the official [[https://docs.docker.com|Docker documentation]] and resources for further assistance.+Docker is a popular container tool and ecosystem, comparable to [[Containers|FreeBSD Container & Jail tools]], used to simplify and speed-up the creation, deployment and management of isolated application environments.
  
-===== Status =====+  * [[https://www.docker.com/|Docker Homepage]]
  
-Docker on %%FreeBSD%% is experimental.+Work is currently in-progress to develop a [[Containers#runj|FreeBSD Containers: Jail runtime implementation ("runj")]] and %%FreeBSD%% OCI Container Specification necessary to integrate %%FreeBSD%% support into the broader Docker ecosystem.
  
-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.+runj is officially supported by containerd, supports Linux Jails and experimental network support, see [[Containers#runj|runj]] for more detail.
  
-The [[https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization|freebsd-virtualization mailing list]], as well as the IRC channels #freebsd-docker and #bhyve on chat.freenode.net are good places to participate.+====== Contact ======
  
-===== Requirements =====+  * [[https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization|freebsd-virtualization mailing list]] 
 +  * IRC: #freebsd-docker and #bhyve channels on Libera Chat.
  
-%%FreeBSD%% 11-STABLE or newer, specificially any version after [[https://svnweb.freebsd.org/base?view=revision&revision=283424|preliminary support for x86-64 Linux binaries]] was addded.+====== 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://www.docker.io|docker.io]] repository. 
 + 
 +  * [[https://github.com/kvasdopil/docker|github: kvasdopil/docker]] (Original Docker %%FreeBSD%% Port) 
 +    * [[https://github.com/kvasdopil/docker/blob/freebsd-compat/FREEBSD-PORTING.md|Porting Notes: FREEBSD-PORTING.md]] 
 +  * [[https://svnweb.freebsd.org/ports/head/sysutils/docker-freebsd/|FreeBSD Port: sysutils/docker-freebsd]] (Deleted: Jan 2020) 
 + 
 +At last update, Docker (docker-freebsd port) was [[https://svnweb.freebsd.org/changeset/ports/494712|marked broken]] due to the following build error: 
 + 
 +<code> 
 +.gopath/src/github.com/docker/docker/pkg/system/mknod.go:12:22: cannot use dev 
 +(type int) as type uint64 in argument to syscall.Mknod 
 +</code> 
 + 
 +A [[https://reviews.freebsd.org/D21570|code review]] was opened in 2019 updating Docker to a later versions, but progress stalled. 
 + 
 +===== 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.
  
-[[https://github.com/kvasdopil/docker|github.com/kvasdopil/docker]] contains the port of Docker for %%FreeBSD%%.+%%FreeBSD%% 11.1-RELEASE or newer, specifically any version after [[https://svnweb.freebsd.org/base?view=revision&revision=283424|preliminary support for x86-64 Linux binaries]] was added.
  
-[[https://svnweb.freebsd.org/ports/head/sysutils/docker-freebsd/|sysutils/docker-freebsd]] contains the %%FreeBSD%% port for Docker. 
-Docker port. 
 ===== Installation and Use ===== ===== Installation and Use =====
  
Line 43: 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=/usr/docker <zroot>/docker +# zfs create -o mountpoint=/usr/docker <zroot>/docker
  
 And lastly enable the docker daemon And lastly enable the docker daemon
Line 83: Line 99:
 % docker pull centos % docker pull centos
 latest: Pulling from centos latest: Pulling from centos
-f1b10cd84249: Pull complete  +f1b10cd84249: Pull complete 
-c852f6d61e65: Pull complete  +c852f6d61e65: Pull complete 
-7322fbe74aa5: Already exists +7322fbe74aa5: Already exists
 centos:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. centos:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
 Digest: sha256:57554136c655abb33ecb7bb790b1db0279668d3763c3b81f31bc6c4e60e4a1f3 Digest: sha256:57554136c655abb33ecb7bb790b1db0279668d3763c3b81f31bc6c4e60e4a1f3
Line 142: Line 158:
 NAME    USED  AVAIL  REFER  MOUNTPOINT NAME    USED  AVAIL  REFER  MOUNTPOINT
 zroot    55K  3.75G    19K  /zroot zroot    55K  3.75G    19K  /zroot
-# zpool list                                                                                                                                                                             +# zpool list
 NAME    SIZE  ALLOC   FREE   FRAG  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT NAME    SIZE  ALLOC   FREE   FRAG  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
 zroot  3.88G  11.8M  3.86G     0%         -     0%  1.00x  ONLINE  - zroot  3.88G  11.8M  3.86G     0%         -     0%  1.00x  ONLINE  -
Line 217: Line 233:
 ==== FreeBSD on Docker Hub ==== ==== FreeBSD on Docker Hub ====
  
-  * https://hub.docker.com/r/lexaguskov/freebsd/ +  * [[https://hub.docker.com/r/lexaguskov/freebsd/|lexaguskov/freebsd: container image]] (hub.docker.com) 
-  * https://hub.docker.com/r/kazuyoshi/freebsd-minimal/ +  * [[https://hub.docker.com/r/kazuyoshi/freebsd-minimal/|kazuyoshi/freebsd-minimal: container image]] (hub.docker.com) 
-  * https://hub.docker.com/search/?q=freebsd&page=1&isAutomated=0&isOfficial=0&starCount=0&pullCount=0+  * [[https://hub.docker.com/search/?q=freebsd&page=1&isAutomated=0&isOfficial=0&starCount=0&pullCount=0|Docker Hub Search: freebsd]]
  
 ==== FreeBSD Docker on News and Article ==== ==== FreeBSD Docker on News and Article ====
Line 226: Line 242:
   * https://www.freebsdnews.com/2015/07/09/docker-freebsd/   * https://www.freebsdnews.com/2015/07/09/docker-freebsd/
   * https://news.ycombinator.com/item?id=9908195   * https://news.ycombinator.com/item?id=9908195
 +
 +----
 +
 +{{tag>Virtualization}}
 +{{tag>HowTo}}
  
  • docker.1502499824.txt.gz
  • Last modified: 2017/08/12 01:03
  • by RTylerCroy