Skip to content

Commit bc4ab60

Browse files
committed
chore(docker): update Dockerfiles to remove steam user and set environment variables
* Added `USER root` to ensure proper permissions. * Enhanced user removal command with logging for better visibility. * Set `DEBIAN_FRONTEND` environment variable correctly.
1 parent 9bcde56 commit bc4ab60

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.github/workflows/action-docker-publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
tags: ${{ steps.meta.outputs.tags }}
108108
labels: ${{ steps.meta.outputs.labels }}
109109

110-
111110
build-ubuntu-2004:
112111
name: Build Ubuntu 20.04
113112
runs-on: ubuntu-latest
@@ -175,4 +174,4 @@ jobs:
175174
permissions:
176175
actions: write
177176
steps:
178-
- uses: liskin/gh-workflow-keepalive@v1
177+
- uses: liskin/gh-workflow-keepalive@v1

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Dockerfile.ubuntu-2004

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66

77
FROM ghcr.io/gameservermanagers/steamcmd:ubuntu-20.04
88

9+
USER root
10+
11+
## Remove steam user from upstream base image if present
12+
RUN if id -u steam >/dev/null 2>&1; then echo "Removing steam user from base image"; userdel -r steam || true; else echo "steam user not present"; fi
13+
914
LABEL maintainer="LinuxGSM <[email protected]>"
10-
ENV DEBIAN_FRONTEND noninteractive
15+
ENV DEBIAN_FRONTEND=noninteractive
1116
ENV TERM=xterm
1217
ENV LGSM_GITHUBUSER=GameServerManagers
1318
ENV LGSM_GITHUBREPO=LinuxGSM

Dockerfile.ubuntu-2204

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66

77
FROM ghcr.io/gameservermanagers/steamcmd:ubuntu-22.04
88

9+
USER root
10+
11+
## Remove steam user from upstream base image if present
12+
RUN if id -u steam >/dev/null 2>&1; then echo "Removing steam user from base image"; userdel -r steam || true; else echo "steam user not present"; fi
13+
914
LABEL maintainer="LinuxGSM <[email protected]>"
10-
ENV DEBIAN_FRONTEND noninteractive
15+
ENV DEBIAN_FRONTEND=noninteractive
1116
ENV TERM=xterm
1217
ENV LGSM_GITHUBUSER=GameServerManagers
1318
ENV LGSM_GITHUBREPO=LinuxGSM

Dockerfile.ubuntu-2404

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66

77
FROM ghcr.io/gameservermanagers/steamcmd:ubuntu-24.04
88

9+
USER root
10+
911
## Remove steam user from upstream base image if present
10-
RUN if id -u steam >/dev/null 2>&1; then userdel -r steam || true; fi
12+
RUN if id -u steam >/dev/null 2>&1; then echo "Removing steam user from base image"; userdel -r steam || true; else echo "steam user not present"; fi
1113

1214
LABEL maintainer="LinuxGSM <[email protected]>"
13-
ENV DEBIAN_FRONTEND noninteractive
15+
ENV DEBIAN_FRONTEND=noninteractive
1416
ENV TERM=xterm
1517
ENV LGSM_GITHUBUSER=GameServerManagers
1618
ENV LGSM_GITHUBREPO=LinuxGSM

0 commit comments

Comments
 (0)