void-packages/srcpkgs/docker/template
Joseph Benden ec709f9e09 docker: update to 19.03.6.
* Update to version 19.03.6.
* Ensure runit-based logging works.

Signed-off-by: Joseph Benden <joe@benden.us>
2020-02-15 12:35:02 +01:00

64 lines
2.3 KiB
Bash

# Template file for 'docker'
pkgname=docker
version=19.03.6
revision=1
conf_files="/etc/docker/daemon.json"
wrksrc="${pkgname}-ce-${version}"
hostmakedepends="git go pkg-config curl cmake tar"
makedepends="libbtrfs-devel sqlite-devel device-mapper-devel libseccomp-devel
libapparmor-devel libltdl-devel"
depends="containerd runc"
short_desc="Pack, ship and run any application as a lightweight container"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="Apache-2.0"
homepage="http://www.docker.io"
distfiles="https://github.com/docker/docker-ce/archive/v${version}.tar.gz"
checksum=805b586f5fbc5d236ac181068f7aa345bc5ec25d8f246e46e0f3ad55a69c63d5
# These are required at run-time.
depends+=" iptables xz git"
nopie=yes
nostrip=yes
nocross=yes
archs="aarch64* armv7l* x86_64* ppc64le*"
system_groups="docker"
_docker_components="tini proxy dockercli"
do_build() {
cd components/cli
# AUTO_GOPATH=1 doesn't seem to work for CLI
rm -rf .gopath
mkdir -p .gopath/src/github.com/docker
ln -sf $wrksrc/components/cli .gopath/src/github.com/docker/
GOPATH=$wrksrc/components/cli/.gopath LDFLAGS='' \
make VERSION=${version} dynbinary
rm -rf .gopath
cd ../../components/engine
AUTO_GOPATH=1 DOCKER_BUILDTAGS='seccomp apparmor' VERSION=${version} DOCKER_GITCOMMIT=v${version} \
hack/make.sh dynbinary
}
pre_build() {
cd components/engine
vmkdir usr/bin
sed -i "s|/usr/local|$DESTDIR/usr|g" hack/dockerfile/install/install.sh
for COMPONENT in $_docker_components; do
AUTO_GOPATH=1 LDFLAGS='' DOCKER_BUILDTAGS='seccomp apparmor' DOCKER_GITCOMMIT=v${version} \
hack/dockerfile/install/install.sh $COMPONENT
done
}
do_install() {
vmkdir etc/docker
vinstall ${FILESDIR}/daemon.json 640 etc/docker daemon.json
vbin components/engine/bundles/dynbinary-daemon/dockerd dockerd
vbin components/cli/build/docker docker
vinstall components/cli/contrib/completion/bash/docker 644 usr/share/bash-completion/completions
vinstall components/cli/contrib/completion/zsh/_docker 644 usr/share/zsh/site-functions
vinstall components/cli/contrib/completion/fish/docker.fish 644 usr/share/fish_vendor_completions.d/docker.fish
vinstall components/engine/contrib/syntax/vim/syntax/dockerfile.vim 644 usr/share/vim/vimfiles/snytax/dockerfile.vim
vinstall components/engine/contrib/syntax/vim/ftdetect/dockerfile.vim 644 usr/share/vim/vimfiles/ftdetect/dockerfile.vim
vsv docker
}