Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN ls /app/frontend/dist/rocketadmin/browser

FROM node:24-slim

RUN groupadd -r appuser && useradd -r -g appuser -d /app -s /sbin/nologin appuser
RUN groupadd -r -g 1001 appuser && useradd -r -u 1001 -g appuser -d /app -s /sbin/nologin appuser

RUN apt-get update && apt-get install -y \
tini nginx \
Expand All @@ -50,7 +50,7 @@ RUN chown -R appuser:appuser /var/lib/nginx
RUN chown -R appuser:appuser /var/log/nginx
RUN chown -R appuser:appuser /run

USER appuser
USER 1001

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USER 1001 sets only the UID; the effective GID can default to 0 (root) when the group isn’t provided, which is a security footgun and can cause unexpected permission behavior. Since appuser is created with GID 1001, prefer USER 1001:1001 here.

Suggested change
USER 1001
USER 1001:1001

Copilot uses AI. Check for mistakes.

WORKDIR /app/backend
ENTRYPOINT ["/app/backend/entrypoint.sh"]
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.rocketadmin-agent
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:24-slim

RUN groupadd -r appuser && useradd -r -g appuser -d /app -s /sbin/nologin appuser
RUN groupadd -r -g 1001 appuser && useradd -r -u 1001 -g appuser -d /app -s /sbin/nologin appuser

WORKDIR /app
RUN apt-get update && apt-get install -y netcat-openbsd make gcc g++ python3 libxml2
Expand All @@ -15,7 +15,7 @@ RUN cd rocketadmin-agent && yarn run build

RUN chown -R appuser:appuser /app

USER appuser
USER 1001

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USER 1001 sets only the UID; some runtimes may default the primary GID to 0 (root) if it isn’t specified. Since you’re creating appuser with GID 1001, use USER 1001:1001 to ensure the container doesn’t run in the root group and to avoid group-based permission surprises.

Suggested change
USER 1001
USER 1001:1001

Copilot uses AI. Check for mistakes.

WORKDIR /app/rocketadmin-agent
CMD ["node", "dist/main.js"]
2 changes: 1 addition & 1 deletion autoadmin-ws-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN yarn install --production && yarn cache clean

COPY --from=builder /app/dist ./dist

USER nodejs
USER 1001

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using USER 1001 sets only the UID; depending on the container runtime, the GID may default to 0 (root) when the group isn’t specified. To keep the process out of the root group and match the created nodejs group (GID 1001), set the directive explicitly to USER 1001:1001 (or USER nodejs:nodejs).

Suggested change
USER 1001
USER nodejs:nodejs

Copilot uses AI. Check for mistakes.

EXPOSE 8008 8009

Expand Down
Loading