File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 11FROM ubuntu:20.04
22
33ARG DEBIAN_FRONTEND=noninteractive
4+ ARG PUID=1000
5+ ARG PGID=1000
46ARG BUILD_DATE
57ARG VCS_REF
68
@@ -34,8 +36,9 @@ RUN locale-gen en_US.UTF-8
3436ENV LANG=en_US.UTF-8
3537ENV LANGUAGE=en_US:en
3638
37- # Create non-root user
38- RUN useradd -m -d /home/steam -s /bin/bash steam \
39+ # Create non-root user/group with configurable IDs
40+ RUN groupadd -g "${PGID}" steam \
41+ && useradd -l -u "${PUID}" -g steam -m -d /home/steam -s /bin/bash steam \
3942 && mkdir -p /home/steam/Steam \
4043 && chown -R steam:steam /home/steam
4144USER steam
Original file line number Diff line number Diff line change 11FROM ubuntu:22.04
22
33ARG DEBIAN_FRONTEND=noninteractive
4+ ARG PUID=1000
5+ ARG PGID=1000
46ARG BUILD_DATE
57ARG VCS_REF
68
@@ -34,8 +36,9 @@ RUN locale-gen en_US.UTF-8
3436ENV LANG=en_US.UTF-8
3537ENV LANGUAGE=en_US:en
3638
37- # Create non-root user
38- RUN useradd -m -d /home/steam -s /bin/bash steam \
39+ # Create non-root user/group with configurable IDs
40+ RUN groupadd -g "${PGID}" steam \
41+ && useradd -l -u "${PUID}" -g steam -m -d /home/steam -s /bin/bash steam \
3942 && mkdir -p /home/steam/Steam \
4043 && chown -R steam:steam /home/steam
4144USER steam
Original file line number Diff line number Diff line change 11FROM ubuntu:24.04
22
33ARG DEBIAN_FRONTEND=noninteractive
4+ ARG PUID=1000
5+ ARG PGID=1000
46ARG BUILD_DATE
57ARG VCS_REF
68
@@ -35,7 +37,8 @@ ENV LANG=en_US.UTF-8
3537ENV LANGUAGE=en_US:en
3638
3739# Create non-root user
38- RUN useradd -m -d /home/steam -s /bin/bash steam \
40+ RUN groupadd -g "${PGID}" steam \
41+ && useradd -l -u "${PUID}" -g steam -m -d /home/steam -s /bin/bash steam \
3942 && mkdir -p /home/steam/Steam \
4043 && chown -R steam:steam /home/steam
4144USER steam
You can’t perform that action at this time.
0 commit comments