File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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/
4748COPY 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
5960VOLUME /app/data
6061EXPOSE 8080
You can’t perform that action at this time.
0 commit comments