From 42d02842aa03fef2b215b18ea0a388cdb1df58c3 Mon Sep 17 00:00:00 2001 From: thelamer Date: Wed, 22 Sep 2021 14:18:45 -0700 Subject: [PATCH] move chmod logic to init --- Dockerfile | 6 +----- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 6 +----- root/etc/cont-init.d/10-adduser | 5 +++++ 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62adc2c..5873a71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,11 +104,7 @@ RUN \ pacman -Sy --noconfirm \ patch && \ patch -u /etc/s6/init/init-stage2 -i /init-stage2.patch && \ - echo "**** cleanup and perms ****" && \ - chmod 755 \ - /etc \ - /usr \ - /usr/bin && \ + echo "**** cleanup ****" && \ pacman -Rsn --noconfirm \ patch && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2c6f557..8cb7b51 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -97,7 +97,7 @@ RUN \ pacman -Sy --noconfirm \ patch && \ patch -u /etc/s6/init/init-stage2 -i /init-stage2.patch && \ - echo "**** cleanup and perms ****" && \ + echo "**** cleanup ****" && \ chmod 755 \ /etc \ /usr \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 512ae9e..0f13f84 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -97,11 +97,7 @@ RUN \ pacman -Sy --noconfirm \ patch && \ patch -u /etc/s6/init/init-stage2 -i /init-stage2.patch && \ - echo "**** cleanup and perms ****" && \ - chmod 755 \ - /etc \ - /usr \ - /usr/bin && \ + echo "**** cleanup ****" && \ pacman -Rsn --noconfirm \ patch && \ rm -rf \ diff --git a/root/etc/cont-init.d/10-adduser b/root/etc/cont-init.d/10-adduser index 2ef3ed4..c3b6c5e 100644 --- a/root/etc/cont-init.d/10-adduser +++ b/root/etc/cont-init.d/10-adduser @@ -50,6 +50,11 @@ Some apps might not behave correctly without this ' fi +chmod 755 \ + /etc \ + /usr \ + /usr/bin + chown abc:abc /app chown abc:abc /config chown abc:abc /defaults