From 65d0426b915472bd680788158d0c66bbbec9716e Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 28 Nov 2016 17:16:13 +0100 Subject: [PATCH] Use su-exec instead of gosu, much smaller --- Dockerfile | 6 +++--- Dockerfile.rpi | 6 +++--- docker/etc/s6/gitea/run | 2 +- docker/etc/s6/openssh/run | 2 +- docker/etc/s6/syslogd/run | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index df363e07f..fd25c8834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ MAINTAINER Thomas Boerger EXPOSE 22 3000 -RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ - apk -U add \ - gosu@testing \ +RUN apk update && \ + apk add \ + su-exec \ shadow \ ca-certificates \ sqlite \ diff --git a/Dockerfile.rpi b/Dockerfile.rpi index 6a168c3a5..d237a63ba 100644 --- a/Dockerfile.rpi +++ b/Dockerfile.rpi @@ -3,9 +3,9 @@ MAINTAINER Thomas Boerger EXPOSE 22 3000 -RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ - apk -U add \ - gosu@testing \ +RUN apk update && \ + apk add \ + su-exec \ shadow \ ca-certificates \ sqlite \ diff --git a/docker/etc/s6/gitea/run b/docker/etc/s6/gitea/run index 246e74d27..1fddb9370 100755 --- a/docker/etc/s6/gitea/run +++ b/docker/etc/s6/gitea/run @@ -2,5 +2,5 @@ [[ -f ./setup ]] && source ./setup pushd /app/gitea > /dev/null - exec gosu git /app/gitea/gitea web + exec su-exec git /app/gitea/gitea web popd diff --git a/docker/etc/s6/openssh/run b/docker/etc/s6/openssh/run index b4c4cb408..46f422cce 100755 --- a/docker/etc/s6/openssh/run +++ b/docker/etc/s6/openssh/run @@ -2,5 +2,5 @@ [[ -f ./setup ]] && source ./setup pushd /root > /dev/null - exec gosu root /usr/sbin/sshd -E /var/log/sshd.log -D + exec su-exec root /usr/sbin/sshd -E /var/log/sshd.log -D popd diff --git a/docker/etc/s6/syslogd/run b/docker/etc/s6/syslogd/run index d87609304..2c8d2cf1f 100755 --- a/docker/etc/s6/syslogd/run +++ b/docker/etc/s6/syslogd/run @@ -2,5 +2,5 @@ [[ -f ./setup ]] && source ./setup pushd /root > /dev/null - exec gosu root /sbin/syslogd -nS -O- + exec su-exec root /sbin/syslogd -nS -O- popd