Index: sysutils/docker-freebsd/Makefile =================================================================== --- sysutils/docker-freebsd/Makefile +++ sysutils/docker-freebsd/Makefile @@ -1,39 +1,29 @@ -# Created by: kmoore@FreeBSD.org # $FreeBSD$ -PORTNAME= docker-freebsd -PORTVERSION= 20150625 -PORTREVISION= 2 +PORTNAME= docker-engine +DISTVERSIONPREFIX= v +DISTVERSION= 19.03.2 CATEGORIES= sysutils -MAINTAINER= joneum@FreeBSD.org -COMMENT= Docker containment system +MAINTAINER= decke@FreeBSD.org +COMMENT= Docker Engine based on moby LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= fails to build +BUILD_DEPENDS= bash:shells/bash -BUILD_DEPENDS= bash:shells/bash \ - sqlite3:databases/sqlite3 -RUN_DEPENDS= bash:shells/bash \ - sqlite3:databases/sqlite3 +USES= go -USES= go:run - USE_GITHUB= yes -GH_ACCOUNT= kvasdopil -GH_PROJECT= docker -GH_TAGNAME= 582db78 +GH_ACCOUNT= docker +GH_PROJECT= engine +GH_SUBDIR= src/github.com/docker/docker -PLIST_FILES= bin/docker -USE_RC_SUBR= docker +GO_PKGNAME= github.com/docker/docker +GO_TARGET= ${GO_PKGNAME}/cmd/dockerd do-build: - @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} AUTO_GOPATH=1 DOCKER_GITCOMMIT=${GH_TAGNAME} ./hack/make.sh binary - -do-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/bundles/latest/binary/docker ${STAGEDIR}${PREFIX}/bin/ + @cd ${GO_WRKSRC} && export DOCKER_GITCOMMIT=${GH_TAGNAME} && ${SETENV} ${GO_ENV} ./hack/make.sh binary .include Index: sysutils/docker-freebsd/distinfo =================================================================== --- sysutils/docker-freebsd/distinfo +++ sysutils/docker-freebsd/distinfo @@ -1,2 +1,3 @@ -SHA256 (kvasdopil-docker-20150625-582db78_GH0.tar.gz) = a750d344af4af3d30b1a3373f382ab597a2a7aa4a0bb5c22d650d0c5cc9ac506 -SIZE (kvasdopil-docker-20150625-582db78_GH0.tar.gz) = 7292884 +TIMESTAMP = 1567673816 +SHA256 (docker-engine-v19.03.2_GH0.tar.gz) = 7fbd2ac9101026163479023f548acea1537e107b829fd8a0674b1b88a4feecff +SIZE (docker-engine-v19.03.2_GH0.tar.gz) = 9136789 Index: sysutils/docker-freebsd/files/docker.in =================================================================== --- sysutils/docker-freebsd/files/docker.in +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -# PROVIDE: docker -# REQUIRE: DAEMON -# KEYWORD: nojail shutdown - -. /etc/rc.subr - -name="docker" -rcvar="docker_enable" - -stop_cmd="docker_stop" -start_cmd="docker_start" -command="%%PREFIX%%/bin/docker" - -load_rc_config $name - -: ${docker_enable=NO} -: ${docker_dir=/usr/docker} -: ${docker_nat_pf=YES} -: ${docker_nat_iface=NONE} -: ${docker_flags=} - -docker_start() -{ - if [ ! -d "${docker_dir}" ] ; then - echo "Missing ${docker_dir}! Please create / mount a ZFS dataset at this location." - exit 1 - fi - - if [ -e "/var/run/docker.pid" ] ; then - pgrep -F /var/run/docker.pid 2>/dev/null >/dev/null - if [ $? -eq 0 ] ; then - echo "Docker already running? /var/run/docker.pid" - exit 1 - fi - fi - - echo "Starting docker..." - daemon -p /var/run/docker.pid ${command} -d -e jail -s zfs -g ${docker_dir} -D ${docker_flags} >/var/log/docker.log 2>/var/log/docker.log - - # Check for linux 64bit support and enable - kldstat | grep -q 'linux64' - if [ $? -ne 0 -a -e "/boot/kernel/linux64.ko" ] ; then - kldload linux64 - fi - - # Check for NAT support via PF - # This is an ugly experimental hack for now, eventually will go away - if [ "${docker_nat_pf}" != "YES" ] ; then return ; fi - - # Load PF if not already - kldstat | grep -q 'pf.ko' - if [ $? -ne 0 -a -e "/boot/kernel/pf.ko" ] ; then - kldload pf - fi - - # Check if PF rules already loaded - /sbin/pfctl -s nat 2>/dev/null | grep -q 172.17 - if [ $? -eq 0 ] ; then return ; fi - - if [ "${docker_nat_iface}" != "NONE" ] ; then - iface="${docker_nat_iface}" - else - iface=`/usr/bin/netstat -f inet -nrW | grep '^default' | awk '{ print $6 }'` - fi - echo "nat on ${iface} from 172.17.0.0/16 to any -> (${iface})" > /tmp/pf-nat-docker.$$ - /sbin/pfctl -f /tmp/pf-nat-docker.$$ 2>/dev/null - /sbin/pfctl -e 2>/dev/null - rm /tmp/pf-nat-docker.$$ - -} - -docker_stop() -{ - if [ -e "/var/run/docker.pid" ] ; then - echo "Stopping docker..." - pkill -F /var/run/docker.pid - fi -} - -run_rc_command "$1" - Index: sysutils/docker-freebsd/files/patch-pkg_system_meminfo__unsupported.go =================================================================== --- sysutils/docker-freebsd/files/patch-pkg_system_meminfo__unsupported.go +++ /dev/null @@ -1,9 +0,0 @@ ---- pkg/system/meminfo_unsupported.go.orig 2015-06-08 13:34:30 UTC -+++ pkg/system/meminfo_unsupported.go -@@ -3,5 +3,5 @@ - package system - - func ReadMemInfo() (*MemInfo, error) { -- return nil, ErrNotSupportedPlatform -+ return &MemInfo{}, ErrNotSupportedPlatform - } Index: sysutils/docker-freebsd/files/patch-runconfig_config.go =================================================================== --- sysutils/docker-freebsd/files/patch-runconfig_config.go +++ /dev/null @@ -1,21 +0,0 @@ ---- runconfig/config.go.orig 2015-06-08 13:34:30 UTC -+++ runconfig/config.go -@@ -132,15 +132,15 @@ type Config struct { - - type ContainerConfigWrapper struct { - *Config -- *hostConfigWrapper -+ *HostConfigWrapper - } - - func (c ContainerConfigWrapper) HostConfig() *HostConfig { -- if c.hostConfigWrapper == nil { -+ if c.HostConfigWrapper == nil { - return new(HostConfig) - } - -- return c.hostConfigWrapper.GetHostConfig() -+ return c.HostConfigWrapper.GetHostConfig() - } - - func DecodeContainerConfig(src io.Reader) (*Config, *HostConfig, error) { Index: sysutils/docker-freebsd/files/patch-runconfig_hostconfig.go =================================================================== --- sysutils/docker-freebsd/files/patch-runconfig_hostconfig.go +++ /dev/null @@ -1,33 +0,0 @@ ---- runconfig/hostconfig.go.orig 2015-06-08 13:34:30 UTC -+++ runconfig/hostconfig.go -@@ -234,18 +234,18 @@ type HostConfig struct { - func MergeConfigs(config *Config, hostConfig *HostConfig) *ContainerConfigWrapper { - return &ContainerConfigWrapper{ - config, -- &hostConfigWrapper{InnerHostConfig: hostConfig}, -+ &HostConfigWrapper{InnerHostConfig: hostConfig}, - } - } - --type hostConfigWrapper struct { -+type HostConfigWrapper struct { - InnerHostConfig *HostConfig `json:"HostConfig,omitempty"` - Cpuset string `json:",omitempty"` // Deprecated. Exported for backwards compatibility. - - *HostConfig // Deprecated. Exported to read attrubutes from json that are not in the inner host config structure. - } - --func (w hostConfigWrapper) GetHostConfig() *HostConfig { -+func (w HostConfigWrapper) GetHostConfig() *HostConfig { - hc := w.HostConfig - - if hc == nil && w.InnerHostConfig != nil { -@@ -274,7 +274,7 @@ func (w hostConfigWrapper) GetHostConfig - func DecodeHostConfig(src io.Reader) (*HostConfig, error) { - decoder := json.NewDecoder(src) - -- var w hostConfigWrapper -+ var w HostConfigWrapper - if err := decoder.Decode(&w); err != nil { - return nil, err - } Index: sysutils/docker-freebsd/pkg-descr =================================================================== --- sysutils/docker-freebsd/pkg-descr +++ sysutils/docker-freebsd/pkg-descr @@ -1,12 +1,4 @@ -Docker is an open source project to pack, ship and run any -application as a lightweight container. +Moby is an open-source project created by Docker to enable and accelerate +software containerization. -Docker containers are both hardware-agnostic and platform-agnostic. -This means they can run anywhere, from your laptop to the largest -EC2 compute instance and everything in between - and they don't -require you to use a particular language, framework or packaging -system. That makes them great building blocks for deploying and -scaling web apps, databases, and backend services without depending -on a particular stack or provider. - -WWW: https://github.com/kvasdopil/docker +WWW: https://github.com/docker/engine Index: sysutils/docker-freebsd/pkg-message =================================================================== --- sysutils/docker-freebsd/pkg-message +++ /dev/null @@ -1,26 +0,0 @@ -[ -{ type: install - message: </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. -EOM -} -]