Last active
December 21, 2024 17:06
-
-
Save utkuozdemir/3380c32dfee472d35b9c3e39bc72ff01 to your computer and use it in GitHub Desktop.
A gist to add a user to the Alpine docker image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3 | |
ENV USER_ID=65535 | |
ENV GROUP_ID=65535 | |
ENV USER_NAME=rsync-user | |
ENV GROUP_NAME=rsync-user | |
RUN addgroup -g $GROUP_ID $GROUP_NAME && \ | |
adduser --shell /sbin/nologin --disabled-password \ | |
--no-create-home --uid $USER_ID --ingroup $GROUP_NAME $USER_NAME | |
USER $USER_NAME |
At line 8, shouldn't it be:
RUN addgroup -g $GROUP_ID $GROUP_NAME && \
instead of
RUN addgroup -g $USER_ID $GROUP_NAME && \
Thanks, you are right, I updated it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At line 8, shouldn't it be:
RUN addgroup -g $GROUP_ID $GROUP_NAME && \
instead of
RUN addgroup -g $USER_ID $GROUP_NAME && \