test removing add-user and user-host permissions

This commit is contained in:
ahgraber 2021-02-16 17:52:46 -05:00
parent c15070ac26
commit 200266120b
2 changed files with 4 additions and 42 deletions

View File

@ -69,10 +69,10 @@ RUN mkdir -p \
VOLUME /config
VOLUME /letsencrypt
# create initial user
RUN groupmod -g 1000 users && \
useradd -u 911 -U -d /config -s /bin/false abc && \
usermod -G users abc
# # create initial user
# RUN groupmod -g 1000 users && \
# useradd -u 911 -U -d /config -s /bin/false abc && \
# usermod -G users abc
COPY root/ /
# RUN chmod -R +x /app

View File

@ -1,38 +0,0 @@
#!/usr/bin/with-contenv bash
PUID=${PUID:-911}
PGID=${PGID:-911}
groupmod -o -g "$PGID" abc
usermod -o -u "$PUID" abc
if [ "$(date +%Y)" == "1970" ] && [ "$(uname -m)" == "armv7l" ]; then
echo '
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Your DockerHost is most likely running an outdated version of libseccomp
To fix this, please visit https://docs.linuxserver.io/faq#libseccomp
Some apps might not behave correctly without this
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'
fi
echo '
Cribbed from https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/cont-init.d/10-adduser
-------------------------------------'
echo '
-------------------------------------
GID/UID
-------------------------------------'
echo "
User uid: $(id -u abc)
User gid: $(id -g abc)
-------------------------------------
"
chown abc:abc /app
chown abc:abc /config
chown abc:abc /letsencrypt