From 4656af8c0a93cae3f59af966970f0716709caec7 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 7 Mar 2017 07:59:25 +0000 Subject: [PATCH] Use su-exec instead of sudo --- slim/Dockerfile | 2 +- slim/docker-entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slim/Dockerfile b/slim/Dockerfile index e65c3b5..5a749aa 100644 --- a/slim/Dockerfile +++ b/slim/Dockerfile @@ -19,7 +19,7 @@ RUN set -x \ ca-certificates \ cyrus-sasl \ icu \ - sudo \ + su-exec \ tini \ && apk add --no-cache --virtual build-dependencies \ build-base \ diff --git a/slim/docker-entrypoint.sh b/slim/docker-entrypoint.sh index ce4d6dd..ad0f581 100755 --- a/slim/docker-entrypoint.sh +++ b/slim/docker-entrypoint.sh @@ -24,4 +24,4 @@ chmod 700 "$DATADIR" || exit 2 # ZNC itself responds to SIGTERM, and reaps its children, but whatever was # started via *shell module is not guaranteed to reap their children. # That's why using tini. -exec /sbin/tini -- sudo --user znc /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@" +exec /sbin/tini -- su-exec znc:znc /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@"