diff --git a/Dockerfile b/Dockerfile index f56490c..f95691f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -99,6 +99,7 @@ RUN \ /app \ /config \ /defaults && \ + mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index dff2769..bc2a1f5 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -99,6 +99,7 @@ RUN \ /app \ /config \ /defaults && \ + mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-aarch64-static -L \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index e9c989c..e334f1b 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -99,6 +99,7 @@ RUN \ /app \ /config \ /defaults && \ + mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-arm-static -L \ diff --git a/root/usr/bin/with-contenv b/root/usr/bin/with-contenv new file mode 100644 index 0000000..b535def --- /dev/null +++ b/root/usr/bin/with-contenv @@ -0,0 +1,7 @@ +#! /bin/bash +if [[ -f /var/run/s6/container_environment/UMASK ]] && [[ "$(pwdx $$)" =~ "/run/s6/services/" ]]; then + umask $(cat /var/run/s6/container_environment/UMASK) + exec /usr/bin/with-contenvb "$@" +else + exec /usr/bin/with-contenvb "$@" +fi