aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-02-22 20:01:14 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-02-25 22:09:49 -0300
commit24924763d56dd80da5430746a238868ab6cc20d5 (patch)
treef285d68a2ff515397283432d0ba5fb4306c9741a
parent4763e20f8ca52d617411acba3fd766528cd03aad (diff)
downloadaports-24924763d56dd80da5430746a238868ab6cc20d5.tar.bz2
aports-24924763d56dd80da5430746a238868ab6cc20d5.tar.xz
community/docker: transition to supervise-daemon
-rw-r--r--community/docker/APKBUILD20
-rw-r--r--community/docker/docker.confd26
-rw-r--r--community/docker/docker.initd29
3 files changed, 65 insertions, 10 deletions
diff --git a/community/docker/APKBUILD b/community/docker/APKBUILD
index 975a9e1148..f13359f8d9 100644
--- a/community/docker/APKBUILD
+++ b/community/docker/APKBUILD
@@ -4,7 +4,7 @@
pkgname=docker
pkgver=19.03.6
_gitcommit=369ce74a3ce86a392e39e45d3960ce970fdfac97 # https://github.com/docker/docker-ce/commits/v$pkgver
-pkgrel=0
+pkgrel=1
pkgdesc="Pack, ship and run any application as a lightweight container"
url="https://www.docker.io/"
arch="all"
@@ -21,11 +21,11 @@ _libnetwork_ver=9fd385be8302dbe1071a3ce124891893ff27f90f
_cobra_ver="0.0.3"
# secfixes:
-# 19.03.1:
+# 19.03.1-r0:
# - CVE-2019-14271
-# 18.09.8:
+# 18.09.8-r0:
# - CVE-2019-13509
-# 18.09.7:
+# 18.09.7-r0:
# - CVE-2018-15664
subpackages="
@@ -43,7 +43,8 @@ source="
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
cobra-$_cobra_ver.tar.gz::https://github.com/spf13/cobra/archive/v$_cobra_ver.tar.gz
- docker-openrc-fixes.patch
+ docker.initd
+ docker.confd
"
builddir="$srcdir"/docker-ce-$pkgver
@@ -129,10 +130,8 @@ engine_openrc() {
depends=""
install_if="openrc $pkgname-engine=$pkgver-r$pkgrel"
- install -Dm755 "$_daemon_builddir"/contrib/init/openrc/docker.initd \
- "$subpkgdir"/etc/init.d/docker
- install -Dm644 "$_daemon_builddir"/contrib/init/openrc/docker.confd \
- "$subpkgdir"/etc/conf.d/docker
+ install -Dm755 "$srcdir"/docker.initd "$subpkgdir"/etc/init.d/docker
+ install -Dm644 "$srcdir"/docker.confd "$subpkgdir"/etc/conf.d/docker
}
cli() {
@@ -197,4 +196,5 @@ cli_vim() {
sha512sums="ece435de92e50d2a6204ac46cc9116fca9a1cb2ea400351d2fec723ad68ca2f5082695fdbca194ad0b87029e6ce266c8b4c10ac3b33842097e9be66fb4930797 docker-19.03.6.tar.gz
699d1250ef79b451fb2ab5cbb245a603596c09c440dc916c71fb5078c66457c92cfd3d8691d3ecd81601a2a25f0694e5548f13fd25842aad2a21ca6c71c435d0 libnetwork-9fd385be8302dbe1071a3ce124891893ff27f90f.tar.gz
c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb cobra-0.0.3.tar.gz
-6d3f1e71910a717d52820fbfe81663baadf3f5aa5ab39071d15c02ef49b51fe1978033e1cafc8482a468983bf872ab39d37759b82221778cbb2392a9eac41d65 docker-openrc-fixes.patch"
+21a394aa498e702113d51849f8e56936a101d706c67f8082fe05d94f86a4c19661fbf2f24cdb8c28439523def631d04451a053039b8075be53602f0792313cf9 docker.initd
+f25523f43376ccef71a49618e556e0a16db3acad29eb09fe86c4e572562bdea0bc1eabab00159278835ad9d7c007f2cd10b2ed31f7213b0d9074582dc80a976f docker.confd"
diff --git a/community/docker/docker.confd b/community/docker/docker.confd
new file mode 100644
index 0000000000..f96e611291
--- /dev/null
+++ b/community/docker/docker.confd
@@ -0,0 +1,26 @@
+# /etc/conf.d/docker: config file for /etc/init.d/docker
+
+# where the docker daemon output gets piped
+# this contains both stdout and stderr. If you need to separate them,
+# see the settings below
+#DOCKER_LOGFILE="/var/log/docker.log"
+
+# where the docker daemon stdout gets piped
+# if this is not set, DOCKER_LOGFILE is used
+#DOCKER_OUTFILE="/var/log/docker-out.log"
+
+# where the docker daemon stderr gets piped
+# if this is not set, DOCKER_LOGFILE is used
+#DOCKER_ERRFILE="/var/log/docker-err.log"
+
+# Settings for process limits (ulimit)
+#DOCKER_ULIMIT="-c unlimited -n 1048576 -u unlimited"
+
+# seconds to wait for sending SIGTERM and SIGKILL signals when stopping docker
+#DOCKER_RETRY="TERM/60/KILL/10"
+
+# where the docker daemon itself is run from
+#DOCKERD_BINARY="/usr/bin/dockerd"
+
+# any other random options you want to pass to docker
+DOCKER_OPTS=""
diff --git a/community/docker/docker.initd b/community/docker/docker.initd
new file mode 100644
index 0000000000..5a56d983a4
--- /dev/null
+++ b/community/docker/docker.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+name="Docker Daemon"
+description="Persistent process that manages docker containers"
+description_reload="Reload configuration without exiting"
+
+command="${DOCKERD_BINARY:-/usr/bin/dockerd}"
+command_args="${DOCKER_OPTS}"
+DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
+DOCKER_ERRFILE="${DOCKER_ERRFILE:-${DOCKER_LOGFILE}}"
+DOCKER_OUTFILE="${DOCKER_OUTFILE:-${DOCKER_LOGFILE}}"
+supervise_daemon_args="--stderr \"${DOCKER_ERRFILE}\" --stdout \"${DOCKER_OUTFILE}\""
+
+extra_started_commands="reload"
+
+rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}"
+
+retry="${DOCKER_RETRY:-TERM/60/KILL/10}"
+
+start_pre() {
+ checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ $supervisor $RC_SVCNAME --signal HUP
+ eend $?
+}