Skip to content
Open
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
16 changes: 10 additions & 6 deletions platform/wab/tools/docker-dev/Dockerfile.dev.aio
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ RUN mkdir -p /tmp/.plasmic && \
# --- Final stage ---
FROM node:24-alpine

# Create non-root user and prepare env
RUN addgroup -S plasmic && \
adduser -S plasmic -G plasmic && \
# Delete container default node user
RUN deluser --remove-home node 2>/dev/null || true && \
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense to me! But maybe it's possible to just use the builtin node user, if it doesn't break anything?

Copy link
Author

Choose a reason for hiding this comment

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

I can't say. I know very little about node users.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just mean that the node:24-alpine has a user already (called node), so we can just use that. I'll test it out when I get the chance.

delgroup node 2>/dev/null || true

# Create non-root user with UID 1000 and GID 1000 and prepare env
RUN addgroup -g 1000 plasmic && \
adduser -u 1000 -G plasmic -S plasmic && \
apk add --no-cache git jq bash && \
echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf && \
sysctl -p && \
mkdir -p $HOME && \
chown -R plasmic:plasmic $HOME
mkdir -p /home/plasmic && \
chown -R 1000:1000 /home/plasmic

USER plasmic

Expand All @@ -58,4 +62,4 @@ CMD [" jq '(.host = \"plasmic-db\") | (.password //= \"SEKRET\")' ormconfig.json
yarn seed && \
cd /plasmic && \
yarn dev \
"]
"]