diff --git a/srcpkgs/docker/files/docker/run b/srcpkgs/docker/files/docker/run index 3a384cffa1..9501824900 100755 --- a/srcpkgs/docker/files/docker/run +++ b/srcpkgs/docker/files/docker/run @@ -1,4 +1,4 @@ #!/bin/sh [ -r conf ] && . ./conf modprobe -q loop || exit 1 -exec chpst -o 1048576 -p 1048576 docker daemon $OPTS 2>/dev/null +exec chpst -o 1048576 -p 1048576 dockerd $OPTS 2>/dev/null diff --git a/srcpkgs/docker/template b/srcpkgs/docker/template index 75ca91bb9b..fb79e24f90 100644 --- a/srcpkgs/docker/template +++ b/srcpkgs/docker/template @@ -1,31 +1,46 @@ # Template file for 'docker' pkgname=docker -version=1.10.3 +version=17.04.0 revision=1 -hostmakedepends="git go" -makedepends="libbtrfs-devel sqlite-devel device-mapper-devel" +_subversion='-ce' +_version="$version$_subversion" +wrksrc="$pkgname-$_version" +hostmakedepends="git go pkg-config cmake" +makedepends="libbtrfs-devel sqlite-devel device-mapper-devel libseccomp-devel" short_desc="Pack, ship and run any application as a lightweight container" -maintainer="Juan RP " +maintainer="Andrea Brancaleoni " license="Apache-2.0" homepage="http://www.docker.io" -distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz" -checksum=6b72fafa4c068a95133f5c9fda9fb148c9412db7a932800689e259a1b1c7ef6d +distfiles="https://github.com/$pkgname/$pkgname/archive/v$_version.tar.gz" +checksum=b6ee0aa93ecea44e956d3627907e10557b3ec37d13ddfb40e436656e5037c640 # These are required at run-time. depends="iptables xz git" +nopie=yes nostrip=yes nocross=yes only_for_archs="x86_64 x86_64-musl" system_groups="docker" do_build() { - export AUTO_GOPATH=1 - export DOCKER_GITCOMMIT=v$version - ./hack/make.sh dynbinary + export AUTO_GOPATH=1 DOCKER_BUILDTAGS='seccomp' + export DOCKER_GITCOMMIT=v$_version + hack/make.sh dynbinary +} + +pre_build() { + export GOPATH=$PWD/gopath + mkdir -p $GOPATH + vmkdir usr/bin + sed -i "s|/usr/local|$DESTDIR/usr|g; s|apparmor||g" hack/dockerfile/install-binaries.sh + hack/dockerfile/install-binaries.sh runc-dynamic\ + containerd-dynamic\ + tini\ + proxy-dynamic } do_install() { - vbin bundles/${version}/dynbinary/docker-${version} docker - vinstall bundles/${version}/dynbinary/dockerinit-${version} 755 usr/lib/docker dockerinit + vbin bundles/${_version}/dynbinary-client/docker-${_version} docker + vbin bundles/${_version}/dynbinary-daemon/dockerd-${_version} dockerd vinstall contrib/completion/bash/docker 644 usr/share/bash-completion/completions vinstall contrib/completion/zsh/_docker 644 usr/share/zsh/site-functions vsv docker