Skip to content

Commit d818483

Browse files
committed
Fix Dockerfile: reuse noble's built-in ubuntu user (UID 1000)
1 parent 5ec2fe3 commit d818483

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

FSTService/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3939
libglib2.0-0t64 libxkbcommon0 libgl1 libfreetype6 libdbus-1-3 \
4040
&& rm -rf /var/lib/apt/lists/*
4141

42-
# Create non-root user for container hardening (UID 1000 matches the previous
43-
# Debian-based image so existing volume files remain writable).
44-
RUN useradd --uid 1000 --no-create-home --home-dir /app --shell /usr/sbin/nologin appuser
42+
# Reuse the existing 'ubuntu' user (UID 1000) for container hardening.
43+
# Noble ships with this user pre-created; UID 1000 matches the previous
44+
# Debian-based image so existing volume files remain writable.
45+
RUN usermod --home /app --shell /usr/sbin/nologin ubuntu
4546

4647
# Download CHOpt CLI for path generation (Linux x64) — pinned in tools/chopt-cli-linux/
4748
COPY tools/chopt-cli-linux/ /app/tools/
@@ -52,9 +53,9 @@ COPY --from=build /app .
5253

5354
# Data directory (DB files + device-auth.json) is a volume mount.
5455
# Create it and set ownership before switching to non-root user.
55-
RUN mkdir -p /app/data && chown -R appuser:appuser /app/data
56+
RUN mkdir -p /app/data && chown -R ubuntu:ubuntu /app/data
5657

57-
USER appuser
58+
USER ubuntu
5859

5960
VOLUME /app/data
6061
EXPOSE 8080

0 commit comments

Comments
 (0)