aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker/APKBUILD
diff options
context:
space:
mode:
authorJake Buchholz <tomalok@gmail.com>2019-01-07 05:38:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-10 09:33:59 +0000
commit201e763325c6b3e7d6e669e049df34e86f54bbb3 (patch)
tree84b9bdaf9cfeaca527ae16bb11d8fdee4af71614 /community/docker/APKBUILD
parent2f6c84f30ec5e943da51b0586a7a9e2e3f077ede (diff)
downloadaports-201e763325c6b3e7d6e669e049df34e86f54bbb3.tar.gz
aports-201e763325c6b3e7d6e669e049df34e86f54bbb3.tar.bz2
aports-201e763325c6b3e7d6e669e049df34e86f54bbb3.tar.xz
community/docker: upgrade to 18.09.0, etc.
* update docker to 18.09.0 * containerd and rund are now built separately * add dependency on tini-static, no need to build it here * use new go-md2man package to process manpages
Diffstat (limited to 'community/docker/APKBUILD')
-rw-r--r--community/docker/APKBUILD113
1 files changed, 31 insertions, 82 deletions
diff --git a/community/docker/APKBUILD b/community/docker/APKBUILD
index f2eb54d507..51915038a9 100644
--- a/community/docker/APKBUILD
+++ b/community/docker/APKBUILD
@@ -1,27 +1,22 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-# Contributor: Bernhard J. M. Gruen <bernhard.gruen@googlemail.com>
+# Contributor: Jake Buchholz <tomalok@gmail.com>
+# Maintainer: Jake Buchholz <tomalok@gmail.com>
+
pkgname=docker
-pkgver=18.06.1
+pkgver=18.09.0
+_gitcommit=4d60db472b # https://github.com/docker/docker-ce/commits/v18.09.0
_ver=${pkgver/_/-}-ce
pkgrel=0
-_gitcommit=v$_ver
pkgdesc="Pack, ship and run any application as a lightweight container"
url="http://www.docker.io/"
arch="all"
license="Apache-2.0"
-depends="ca-certificates iptables"
-makedepends="go btrfs-progs-dev bash linux-headers coreutils libseccomp-dev cmake lvm2-dev libtool"
-options="!check"
+depends="ca-certificates containerd iptables tini-static"
+makedepends="go go-md2man btrfs-progs-dev bash linux-headers coreutils lvm2-dev libtool"
install="$pkgname.pre-install"
# from "$srcdir"/docker-ce-"$_ver"-ce/components/engine/hack/dockerfile/install/*.installer
-_runc_ver=69663f0bd4b60df09991c08812a60108003fa340
-_containerd_ver=468a545b9edcd5932818eb9de8e72413e616e86e # v1.1.2
-_tini_ver=fec3683b971d9c3ef73f284f176672c44b448662 # v0.18.0
-_libnetwork_ver=3ac297bc7fd0afec9051bbb47024c9bc1d75bf5b # proxy.installer
-
+_libnetwork_ver=6da50d1978302f04c3e2089e29112ea24812f05b # proxy.installer
_cobra_ver="0.0.3"
-_go_md2man_ver="1.0.8"
subpackages="
$pkgname-bash-completion:bashcomp:noarch
@@ -33,15 +28,10 @@ subpackages="
"
source="
- docker-$pkgver.tar.gz::https://github.com/docker/docker-ce/archive/v$_ver.tar.gz
- runc-$_runc_ver.tar.gz::https://github.com/opencontainers/runc/archive/$_runc_ver.tar.gz
- containerd-$_containerd_ver.tar.gz::https://github.com/containerd/containerd/archive/$_containerd_ver.tar.gz
+ docker-$pkgver.tar.gz::https://github.com/docker/docker-ce/archive/v$pkgver.tar.gz
libnetwork-$_libnetwork_ver.tar.gz::https://github.com/docker/libnetwork/archive/$_libnetwork_ver.tar.gz
- tini-$_tini_ver.tar.gz::https://github.com/krallin/tini/archive/$_tini_ver.tar.gz
- go-md2man-$_go_md2man_ver.tar.gz::https://github.com/cpuguy83/go-md2man/archive/v$_go_md2man_ver.tar.gz
cobra-$_cobra_ver.tar.gz::https://github.com/spf13/cobra/archive/v$_cobra_ver.tar.gz
docker-openrc-fixes.patch
- tini-cmake-fixes.patch
docker-openrc-busybox-ash.patch
"
@@ -49,12 +39,8 @@ _dockerdir="$srcdir"/docker-$_ver
_cli_builddir="$_dockerdir"/components/cli
_daemon_builddir="$_dockerdir"/components/engine
_buildtags=""
-_runc_buildtags="seccomp"
-_runc_builddir="$srcdir"/runc-$_runc_ver
-_containerd_builddir="$srcdir"/containerd-$_containerd_ver
_libnetwork_builddir="$srcdir"/libnetwork-$_libnetwork_ver
-_tini_builddir="$srcdir"/tini-$_tini_ver
_apply_patches() {
local _dir="$1"
@@ -71,31 +57,18 @@ _apply_patches() {
prepare() {
# Rename 'docker-ce-VER' to 'docker-VER'
- mv "$srcdir"/docker-ce-$_ver "$_dockerdir"
+ mv "$srcdir"/docker-ce-$pkgver "$_dockerdir"
_apply_patches "$_daemon_builddir" docker
- _apply_patches "$_runc_builddir" runc
- _apply_patches "$_tini_builddir" tini
}
build() {
export AUTO_GOPATH=1
- #export GOPATH="$srcdir"
- #export GOBIN="$GOPATH"/bin
- #export PATH="$GOBIN:$PATH"
- export DOCKER_GITCOMMIT=$_gitcommit
+ export GITCOMMIT=$_gitcommit # for cli
+ export DOCKER_GITCOMMIT=$_gitcommit # for engine
export DOCKER_BUILDTAGS=$_buildtags
unset CC # prevent possible ccache issues
- # containerd
- msg "building containerd"
- cd "$_containerd_builddir"
- # Vendor dir only works if it's part of a package in the src dir. Easiest solution is to make it a src dir iself
- mv vendor src
- mkdir -p src/github.com/containerd/
- ln -s "$_containerd_builddir" src/github.com/containerd/containerd
- GOPATH="$PWD" LDFLAGS="" make GIT_COMMIT="$_containerd_ver"
-
# libnetwork (docker-proxy)
msg "building docker-proxy"
cd "$_libnetwork_builddir"
@@ -103,20 +76,6 @@ build() {
ln -s "$_libnetwork_builddir" src/github.com/docker/libnetwork
GOPATH="$PWD" go build -v -ldflags="-linkmode=external" -o docker-proxy github.com/docker/libnetwork/cmd/proxy
- # runc
- msg "building runc"
- cd "$_runc_builddir"
- mv vendor src
- mkdir -p src/github.com/opencontainers/
- ln -s "$_runc_builddir" src/github.com/opencontainers/runc
- GOPATH="$PWD" make COMMIT="$_runc_ver"
-
- # tini
- msg "building tini"
- cd "$_tini_builddir"
- cmake -DVERSION_GIT=$_tini_ver
- make tini-static
-
# daemon
msg "building daemon"
cd "$_daemon_builddir"
@@ -142,16 +101,24 @@ build() {
# cobra
mkdir -p "$GOPATH"/src/github.com/spf13/
ln -sf "$PWD"/cobra-$_cobra_ver "$GOPATH"/src/github.com/spf13/cobra
- # md2man
- mkdir -p "$GOPATH"/src/github.com/cpuguy83/
- ln -s "$PWD"/go-md2man-$_go_md2man_ver "$GOPATH"/src/github.com/cpuguy83/go-md2man
- cd "$GOPATH"/src/github.com/cpuguy83/go-md2man
- go get
# convert md to man pages
msg "generating man pages"
cd "$_cli_builddir"
- make manpages
+ # make manpages (from cli/Makefile, but using installed go-md2man)
+ mkdir -p ./man/man1
+ # Generate man pages from cobra commands
+ go build -o /tmp/gen-manpages github.com/docker/cli/man
+ /tmp/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
+ # generate legacy manpages from markdown
+ ./man/md2man-all.sh -q
+}
+
+check() {
+ cd "$_cli_builddir"/build
+ ./docker --version
+ cd "$_daemon_builddir"/bundles/dynbinary-daemon
+ ./dockerd --version
}
package() {
@@ -162,27 +129,14 @@ package() {
install -Dm755 "$_cli_builddir"/build/docker \
"$pkgdir"/usr/bin/docker
-# install -Dm755 "$_daemon_builddir"/bundles/$ver/dynbinary-daemon/dockerd-$ver \
- install -Dm755 "$_daemon_builddir"/bundles/dynbinary-daemon/dockerd-$ver \
+ install -Dm755 "$_daemon_builddir"/bundles/dynbinary-daemon/dockerd \
"$pkgdir"/usr/bin/dockerd
install -Dm755 "$_libnetwork_builddir"/docker-proxy \
"$pkgdir"/usr/bin/docker-proxy
- install -Dm755 "$_runc_builddir"/runc \
- "$pkgdir"/usr/bin/docker-runc
-
- install -Dm755 "$_containerd_builddir"/bin/containerd \
- "$pkgdir"/usr/bin/docker-containerd
-
- install -Dm755 "$_containerd_builddir"/bin/containerd-shim \
- "$pkgdir"/usr/bin/docker-containerd-shim
-
- install -Dm755 "$_containerd_builddir"/bin/ctr \
- "$pkgdir"/usr/bin/docker-containerd-ctr
-
- install -Dm755 "$_tini_builddir"/tini-static \
- "$pkgdir"/usr/bin/docker-init
+ # symlink externally provided tini-static binary
+ ln -s /sbin/tini-static "$pkgdir"/usr/bin/docker-init
install -Dm755 "$_daemon_builddir"/contrib/init/openrc/docker.initd \
"$pkgdir"/etc/init.d/docker
@@ -233,13 +187,8 @@ vim() {
done
}
-sha512sums="7375452669bf6576e1f8d193cd7f421cf39a26d575351f2b4e433c7fc89384f441547417dbe8c12a12a0937c9fea3800b5c541f0ba8b58ceffe7445183ceeef1 docker-18.06.1.tar.gz
-9a55bdb8e39830f46cceff48970b7688139927552e3d268b9ef4a6e640ffc3d95164b99c5b05d07d295bedc2ea22daf6062fd520df1548d78b1d481fd928f1e3 runc-69663f0bd4b60df09991c08812a60108003fa340.tar.gz
-0c3cb261a535826f281af2d2df7e5c93e7d37139d5b709d7534148b9e706db56704d06b81a9e76acc2e86180f37475d566b8ddde990bbaae424af70206602347 containerd-468a545b9edcd5932818eb9de8e72413e616e86e.tar.gz
-21d3d1bd8aafeab51a3e0a14ada4d559b5b113a48d315e91f7d70e4fa839f5c92d4068b38c28bf6929da9c11cfc61703bafc7148f64b784208d61fa14ee4545d libnetwork-3ac297bc7fd0afec9051bbb47024c9bc1d75bf5b.tar.gz
-ee46d21467f8bacb4e8be72f5dfcbb23c1964286e90b4b3d3bf67dbbf79a337968ac8a0042a8191e329a65398b20ea160aae3ae5ef20ee03ebae11c2083d7621 tini-fec3683b971d9c3ef73f284f176672c44b448662.tar.gz
-4c52e01c9b07582b5d55d1e94935378a676bd284a3e8230a8a191d4678b1b6ae92b704a249117c542832170069a70c649e58a1752fb2973709259b5bc108db91 go-md2man-1.0.8.tar.gz
+sha512sums="a6173d9e2dde33c6059b3464720207a3bc0f4d6d79af65ad10cd30b4b437134ad45fc2039cebcaa41b2dfb68a21963010d63a4051ade6a6d25fcd93c8d560c67 docker-18.09.0.tar.gz
+603ad154d0987a021dae69d542fa82a53b8d25ad9b44cf16f0ef551e0b81e0174dcc73b3a8e9ba89ca1d209f0022e767d44a8350b00b9b4e252cfab698b1d5bd libnetwork-6da50d1978302f04c3e2089e29112ea24812f05b.tar.gz
c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb cobra-0.0.3.tar.gz
33155a79799cc6c0520a030e1a9bdba60441776d612e5e255574b23bbce1c7a8e5d868284b05a8a92704be6bbb7db905388564e867986a705acbe4884ac58584 docker-openrc-fixes.patch
-29a343848d0aa14864c6bfc87c2a6fd408f546f0114e12f7035fb4678ee769fe728872a5d283803177990a61d7e02c4916017d5e45380ad3b0a2dffa3e746857 tini-cmake-fixes.patch
9b24dc0c50904c3d12bb04c1a7df169651043ddbc258018647010a5aa01d8a19ad54d10ca79dce6d6283c81f4fa0cc8de417f6180dd824c5a588b22b23546cb5 docker-openrc-busybox-ash.patch"