Skip to content

Commit 5fbf06b

Browse files
committed
feat(dockerfiles): remove ubuntu user from 24.04 docker image
* Removed `ARG PUID` and `ARG PGID` from Dockerfiles for Ubuntu 20.04, 22.04, and 24.04. * Added a step to remove the default `ubuntu` user in Dockerfile for Ubuntu 24.04.
1 parent 7fb4bf1 commit 5fbf06b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Dockerfile.ubuntu-2004

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM ubuntu:20.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
4-
ARG PUID=1000
5-
ARG PGID=1000
64
ARG BUILD_DATE
75
ARG VCS_REF
86

Dockerfile.ubuntu-2204

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
4-
ARG PUID=1000
5-
ARG PGID=1000
64
ARG BUILD_DATE
75
ARG VCS_REF
86

Dockerfile.ubuntu-2404

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM ubuntu:24.04
22

3+
## Remove ubuntu user added in 24.04 by default
4+
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
5+
36
ARG DEBIAN_FRONTEND=noninteractive
4-
ARG PUID=1000
5-
ARG PGID=1000
67
ARG BUILD_DATE
78
ARG VCS_REF
89

0 commit comments

Comments
 (0)