Last active
July 4, 2024 04:18
-
-
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, you are right, I updated it.