forked from rubensa/docker-ubuntu-tini-user
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On ubuntu:18.04 there is not a non-root "ubuntu" user
- Loading branch information
Showing
6 changed files
with
9 additions
and
20 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM rubensa/ubuntu-tini | ||
FROM rubensa/ubuntu-tini:18.04 | ||
LABEL author="Ruben Suarez <[email protected]>" | ||
|
||
# Architecture component of TARGETPLATFORM (platform of the build result) | ||
|
@@ -16,17 +16,6 @@ ARG GROUP_NAME=group | |
ENV USER_NAME=${USER_NAME} | ||
ENV GROUP_NAME=${GROUP_NAME} | ||
|
||
# Since ubuntu:23.04 a non-root "ubuntu" user is created by default with UID=1000 | ||
# Let's remove it to avoid conflicts | ||
RUN echo "# Removing default 'ubuntu' user..." \ | ||
# | ||
# avoid "userdel: ubuntu mail spool (/var/mail/ubuntu) not found" warning | ||
&& touch /var/mail/ubuntu \ | ||
&& chown ubuntu /var/mail/ubuntu \ | ||
# | ||
# remove user | ||
&& userdel -r ubuntu | ||
|
||
# Create a non-root user with custom group | ||
RUN echo "# Creating group '${GROUP_NAME}' (${GROUP_ID})..." \ | ||
&& groupadd --gid ${GROUP_ID} ${GROUP_NAME} \ | ||
|
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
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
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
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