diff options
author | Matt Housh <jaeger@crux.ninja> | 2016-05-25 18:06:12 -0500 |
---|---|---|
committer | Matt Housh <jaeger@crux.ninja> | 2016-05-25 18:06:12 -0500 |
commit | 6e49d211ec68adf23a63a6229175ae66ffdff925 (patch) | |
tree | e0c1f807e6d7b1dc6c136a885515e1323f809d05 | |
parent | 122dee5d73219c2de603dd85681cffe1b28ca496 (diff) | |
download | contrib-6e49d211ec68adf23a63a6229175ae66ffdff925.tar.gz contrib-6e49d211ec68adf23a63a6229175ae66ffdff925.tar.xz |
docker: adopted, updated to version 1.11.1, runc and containerd added as dependencies
-rw-r--r-- | docker/.footprint | 69 | ||||
-rw-r--r-- | docker/.md5sum | 7 | ||||
-rw-r--r-- | docker/Pkgfile | 60 | ||||
-rw-r--r-- | docker/README | 63 | ||||
-rwxr-xr-x | docker/docker.rc | 37 | ||||
-rwxr-xr-x | docker/pre-install | 5 |
6 files changed, 147 insertions, 94 deletions
diff --git a/docker/.footprint b/docker/.footprint index 24f798fab..3b6c48d3b 100644 --- a/docker/.footprint +++ b/docker/.footprint @@ -1,5 +1,6 @@ drwxr-xr-x root/root etc/ --rw-r--r-- root/root etc/docker.conf +drwxr-xr-x root/root etc/bash_completion.d/ +-rw-r--r-- root/root etc/bash_completion.d/docker drwxr-xr-x root/root etc/rc.d/ -rwxr-xr-x root/root etc/rc.d/docker drwxr-xr-x root/root etc/udev/ @@ -8,9 +9,69 @@ drwxr-xr-x root/root etc/udev/rules.d/ drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/docker -drwxr-xr-x root/root usr/lib/ -drwxr-xr-x root/root usr/lib/docker/ --rwxr-xr-x root/root usr/lib/docker/dockerinit +lrwxrwxrwx root/root usr/bin/docker-containerd -> containerd +lrwxrwxrwx root/root usr/bin/docker-containerd-ctr -> ctr +lrwxrwxrwx root/root usr/bin/docker-containerd-shim -> containerd-shim +lrwxrwxrwx root/root usr/bin/docker-runc -> runc drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/docker/ -rwxr-xr-x root/root usr/share/docker/check-config.sh +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/docker-attach.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-build.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-commit.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-cp.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-create.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-diff.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-events.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-exec.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-export.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-history.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-images.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-import.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-info.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-inspect.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-kill.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-load.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-login.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-logout.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-logs.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-network-connect.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-network-create.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-network-disconnect.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-network-inspect.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-network-ls.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-network-rm.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-pause.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-port.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-ps.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-pull.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-push.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-rename.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-restart.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-rm.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-rmi.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-run.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-save.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-search.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-start.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-stats.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-stop.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-tag.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-top.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-unpause.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-update.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-version.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-volume-create.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-volume-inspect.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-volume-ls.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-volume-rm.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-volume.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker-wait.1.gz +-rw-r--r-- root/root usr/share/man/man1/docker.1.gz +drwxr-xr-x root/root usr/share/man/man5/ +-rw-r--r-- root/root usr/share/man/man5/Dockerfile.5.gz +-rw-r--r-- root/root usr/share/man/man5/config-json.5.gz +drwxr-xr-x root/root usr/share/man/man8/ +-rw-r--r-- root/root usr/share/man/man8/docker-daemon.8.gz diff --git a/docker/.md5sum b/docker/.md5sum index cae460fd7..7b914c5c4 100644 --- a/docker/.md5sum +++ b/docker/.md5sum @@ -1,4 +1,3 @@ -69858e8f5c2f47bae23aae6a11822e55 check-config.sh -13e63698a2302595e7b758b472f3a6bc docker -2d11fa5478327b84cfe94f868672ef5d docker.conf -ad453f7eadac28e7c7251ca68bba02d5 v1.8.1.tar.gz +2767e2b5098dbf330b1fc08e2105207d docker-1.11.1.tar.xz +8c86c300b3e70144c10797deddf10911 docker-man-pages-1.11.1.tar.xz +fc6ebe7d940298fc737ddb662bcd4219 docker.rc diff --git a/docker/Pkgfile b/docker/Pkgfile index c2fdf34aa..02e5ae5cd 100644 --- a/docker/Pkgfile +++ b/docker/Pkgfile @@ -1,39 +1,41 @@ -# Description: Pack, ship and run any application as a lightweight container -# URL: http://www.docker.com/ -# Maintainer: James Mills, prologic at shortcircuit dot net dot au -# Depends on: go sqlite3 cgroupfs-mount start-stop-daemon btrfs-progs +# Description: An open platform for distributed applications for developers and sysadmins +# URL: https://www.docker.com/ +# Maintainer: Matt Housh, jaeger at crux dot ninja +# Depends on: containerd runc btrfs-progs cgroupfs-mount name=docker -version=1.8.1 -revision=d12ea79 -release=1 -source=( - https://raw.githubusercontent.com/docker/docker/v${version}/contrib/check-config.sh - https://github.com/docker/docker/archive/v$version.tar.gz - $name - $name.conf -) +version=1.11.1 +release=3 +source=(http://jaeger.morpheus.net/linux/crux/files/$name-$version.tar.xz \ + http://jaeger.morpheus.net/linux/crux/files/$name-man-pages-$version.tar.xz \ + $name.rc) build() { + export AUTO_GOPATH=1 + export DOCKER_GITCOMMIT=5604cbe cd $name-$version + hack/make.sh dynbinary - # Build - export AUTO_GOPATH=1 - export DOCKER_GITCOMMIT=$revision - unset CC # The build fails with a customer C compiler (e.g: ccache) - unset CXX # The build fails with a customer C++ compiler (e.g: ccache) - ./hack/make.sh dynbinary + install -D -m 0755 bundles/$version/dynbinary/$name-$version \ + $PKG/usr/bin/$name + + for M in 1 5 8; do + install -d -m 0755 $PKG/usr/share/man/man${M} + install -m 0644 $SRC/man${M}/* $PKG/usr/share/man/man${M}/ + done - # Package - install -D -m 755 $SRC/check-config.sh $PKG/usr/share/docker/check-config.sh + install -D -m 0755 $SRC/$name.rc \ + $PKG/etc/rc.d/$name - install -D -m 755 "bundles/$version/dynbinary/docker-$version" \ - "$PKG/usr/bin/docker" - install -D -m 755 "bundles/$version/dynbinary/dockerinit-$version" \ - "$PKG/usr/lib/docker/dockerinit" - install -D -m 644 "contrib/udev/80-docker.rules" \ - "$PKG/etc/udev/rules.d/80-docker.rules" + ln -s containerd $PKG/usr/bin/docker-containerd + ln -s containerd-shim $PKG/usr/bin/docker-containerd-shim + ln -s ctr $PKG/usr/bin/docker-containerd-ctr + ln -s runc $PKG/usr/bin/docker-runc - install -D -m 755 $SRC/$name $PKG/etc/rc.d/$name - install -D -m 644 $SRC/$name.conf $PKG/etc/$name.conf + install -D -m 0755 contrib/check-config.sh \ + $PKG/usr/share/$name/check-config.sh + install -D -m 0644 contrib/udev/80-$name.rules \ + $PKG/etc/udev/rules.d/80-$name.rules + install -D -m 0644 contrib/completion/bash/docker \ + $PKG/etc/bash_completion.d/docker } diff --git a/docker/README b/docker/README index 93cf966c4..acf4780b5 100644 --- a/docker/README +++ b/docker/README @@ -1,62 +1,11 @@ -Kernel Requirements -=================== -If you want to have a full working CRUX+Docker system you will need to -rebuild your kernel and enable various networking, cgroups -and optional lvm options +README for docker -You may check your kernel configuration by running: + To use docker as a non-root user, add the user to the 'docker' + group. -:: - - /usr/share/docker/check-config.sh - -.. note:: If you receive an error such as "cgroup hierarchy: nonexistent??" - then you should run ``cgroupfs-mount`` and re-run - ``/usr/share/docker/check-config.sh``. - - Please follow the guideance of the output of - ``/usr/share/docker/check-config.sh`` carefully. + Docker requires quite a few kernel options to be enabled. To + see a list and check your kernel for compatibility, run + /usr/share/docker/check-config.sh. -Execution Engines -================= - -As of Docker 0.9+ execution engines are pluggable and as such Docker -no longer depends on lxc. - -The new default execution driver is now an internal ``libcontainer`` -driver that replaces the need for lxc. - -Please see the `Docker Documentation <http://docs.docker.io>`_ -if you want to use a different execution engine other then the default. - - -Storage Backends -================ - -Docker comes with three main Storage Backends: - -- AUFS (*requires AUFS kernel/patches*) -- devmapper -- btrfs - -It is recommended you use the devmapper or btrfs backend (Default: devmapper). - -To use the ``btrfs`` backend edit ``/etc/docker.conf`` -and modify the ``DOCKER_OPTS`` with: - -:: - - DOCKER_OPTS="-s btrfs" - -.. note:: As of Docker 0.10.x the ``btrfs`` storage backend is now - considered stable and has been promoted to an officially - supported storage backend. - - -Docker Client -============= - -Add yourself to the ``docker`` group if you wish to access -the Docker daemon on localhost via UNIX Socket. diff --git a/docker/docker.rc b/docker/docker.rc new file mode 100755 index 000000000..5aa23e1ae --- /dev/null +++ b/docker/docker.rc @@ -0,0 +1,37 @@ +#!/bin/sh +# +# /etc/rc.d/sshd: start/stop ssh daemon +# + +SSD=/sbin/start-stop-daemon +PROG=/usr/bin/docker +PID=/var/run/docker.pid +OPTS="-p $PID -G docker" + +case $1 in + start) + /usr/bin/cgroupfs-mount + $SSD --start --pidfile $PID --background --exec $PROG -- daemon $OPTS + ;; + stop) + $SSD --stop --retry 10 --pidfile $PID + ;; + restart) + $0 stop + $0 start + ;; + status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; + *) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + +# End of file diff --git a/docker/pre-install b/docker/pre-install new file mode 100755 index 000000000..b5cf4b3fe --- /dev/null +++ b/docker/pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -z "`getent group docker`" ]; then + /usr/sbin/groupadd --system docker +fi |