1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 18:55:29 +03:00
aports/community/docker/docker.initd
Wolf ee8be104b7 community/docker: fix race condition between docker and iptables
When the system is booting, the order of docker and iptables was not
specified due to the missing dependency. That could lead to docker
setting up the chains and iptables wiping them clean if the order of
start was 1. docker 2. iptables.

Explicit dependency should make that working correctly.
2021-04-30 05:00:44 +00:00

34 lines
913 B
Text

#!/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}"
depend() {
need sysfs cgroups
after iptables ip6tables
}
start_pre() {
checkpath -f -m 0644 -o root:docker "$DOCKER_ERRFILE" "$DOCKER_OUTFILE"
}
reload() {
ebegin "Reloading configuration"
$supervisor $RC_SVCNAME --signal HUP
eend $?
}