Bug 211565

Summary: sysutils/docker-freebsd: update to 20150701 (b1c37d2)
Product: Ports & Packages Reporter: Vinícius Zavam <egypcio>
Component: Individual Port(s)Assignee: Kris Moore <kmoore>
Status: Closed FIXED    
Severity: Affects Some People Keywords: needs-qa, patch
Priority: --- Flags: bugzilla: maintainer-feedback? (kmoore)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
[PATCH] sysutils/docker-freebsd: update to "b1c37d2" none

Description Vinícius Zavam freebsd_committer freebsd_triage 2016-08-04 02:23:29 UTC
Created attachment 173262 [details]
[PATCH] sysutils/docker-freebsd: update to "b1c37d2"

Docker for FreeBSD (https://github.com/kvasdopil/docker/tree/freebsd-compat, tag b1c37d2) is being used for almost two weeks without any crash.

It's powering the server and client side of a 12.0-CURRENT/amd64 box used to create, manipulate, and distribute FreeBSD Containers (https://hub.docker.com/r/egypcio/freebsd).

Attached patch proposes an updates of the actual port (docker-freebsd-20150625, tag 582db78) to a newer version based on current developer stable branch for FreeBSD.

root@box:/usr/ports # svn info sysutils/docker-freebsd/
Path: sysutils/docker-freebsd
Working Copy Root Path: /usr/ports
URL: svn://svnmir.geo.freebsd.org/ports/head/sysutils/docker-freebsd
Relative URL: ^/head/sysutils/docker-freebsd
Repository Root: svn://svnmir.geo.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 419559
Node Kind: directory
Schedule: normal
Last Changed Author: amdmi3
Last Changed Rev: 415503
Last Changed Date: 2016-05-19 08:09:14 -0300 (Thu, 19 May 2016)

root@box:/usr/ports # svn patch ~egypcio/freebsd/ports/ports.HEAD.r419559.sysutils.docker-freebsd.patch
U         sysutils/docker-freebsd/Makefile
U         sysutils/docker-freebsd/distinfo

root@box:/usr/ports # make -C sysutils/docker-freebsd/ all reinstall clean
===>  License APACHE20 accepted by the user
===>   docker-freebsd-20150701 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by docker-freebsd-20150701 for building
===>  Extracting for docker-freebsd-20150701
=> SHA256 Checksum OK for kvasdopil-docker-20150701-b1c37d2_GH0.tar.gz.
===>  Patching for docker-freebsd-20150701
===>   docker-freebsd-20150701 depends on package: go>=1.4 - found
===>   docker-freebsd-20150701 depends on executable: bash - found
===>   docker-freebsd-20150701 depends on executable: sqlite3 - found
===>  Configuring for docker-freebsd-20150701
===>  Building for docker-freebsd-20150701
# WARNING! I don't seem to be running in the Docker container.
# The result of this command might be an incorrect build, and will not be
#   officially supported.
#
# Try this instead: make all
#

---> Making bundle: binary (in bundles/1.7.0-dev/binary)
Building: /usr/ports/sysutils/docker-freebsd/work/docker-b1c37d2/bundles/1.7.0-dev/binary/docker-1.7.0-dev
Created binary: /usr/ports/sysutils/docker-freebsd/work/docker-b1c37d2/bundles/1.7.0-dev/binary/docker-1.7.0-dev

===>  Staging for docker-freebsd-20150701
===>   docker-freebsd-20150701 depends on package: go>=1.4 - found
===>   docker-freebsd-20150701 depends on executable: bash - found
===>   docker-freebsd-20150701 depends on executable: sqlite3 - found
===>   Generating temporary packing list
install  -s -m 555 /usr/ports/sysutils/docker-freebsd/work/docker-b1c37d2/bundles/latest/binary/docker /usr/ports/sysutils/docker-freebsd/work/stage/usr/local/bin/
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Installing for docker-freebsd-20150701
===>   docker-freebsd-20150701 depends on package: go>=1.4 - found
===>   docker-freebsd-20150701 depends on executable: bash - found
===>   docker-freebsd-20150701 depends on executable: sqlite3 - found
===>   Registering installation for docker-freebsd-20150701
Installing docker-freebsd-20150701...
Docker requires a bit of setup before usage.

You will need to create a ZFS dataset on /usr/docker

# zfs create -o mountpoint=/usr/docker <zroot>/docker

And lastly enable the docker daemon
# sysrc -f /etc/rc.conf docker_enable="YES"
# service docker start

(WARNING)

Starting the docker service will also add the following PF rule:

nat on ${iface} from 172.17.0.0/16 to any -> (${iface})

Where $iface is the default NIC on the system, or the value
of $docker_nat_iface. This is for network connectivity to docker
containers in this early port. This should not be needed in future
versions of docker.

===>  Cleaning for docker-freebsd-20150701
root@box:/usr/ports # rehash 

root@box:/usr/ports # docker version
Client version: 1.7.0-dev
Client API version: 1.19
Go version (client): go1.6.3
Git commit (client): b1c37d2
OS/Arch (client): freebsd/amd64
Server version: 1.7.0-dev
Server API version: 1.19
Go version (server): go1.6.3
Git commit (server): b1c37d2
OS/Arch (server): freebsd/amd64

root@box:/usr/ports # service docker stop
Stopping docker...
root@box:/usr/ports # service docker start
Starting docker...
kldload: can't load pf: module already loaded or in kernel

root@box:/usr/ports # pfctl -sn
nat on alc0 inet from 172.17.0.0/16 to any -> (alc0) round-robin

root@box:/usr/ports # docker images | grep freebsd
egypcio/freebsd    12.0-current    0eeb1c06039d    5 hours ago     276.7 MB
egypcio/freebsd    latest          0eeb1c06039d    5 hours ago     276.7 MB
egypcio/freebsd    11.0-beta3      253ff032525f    29 hours ago    350.2 MB
egypcio/freebsd    11.0-beta2      44b46583bb13    29 hours ago    349 MB
egypcio/freebsd    11.0-beta1      a2834e5e90e5    29 hours ago    349 MB
egypcio/freebsd    10.3-release    a98882e8c6f9    29 hours ago    247.5 MB
egypcio/freebsd    9.3-release     9f3f2b7eb0b5    29 hours ago    259.6 MB

root@box:/usr/ports # docker run egypcio/freebsd:10.3-release freebsd-version -u
10.3-RELEASE

root@box:/usr/ports # docker run egypcio/freebsd:9.3-release pkg --version
1.8.7
Comment 1 Vinícius Zavam freebsd_committer freebsd_triage 2017-04-28 13:14:30 UTC
TL;DR? sysutils/docker is available since r436619 :)

Please, 
  if there's no interest on updating this port 
  based on the reported patch I would like to ask to 
  close this PR.

Thank you!