Skip to content
Draft
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
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM node:22

ARG USER_ID
ARG GROUP_ID
ARG USER_NAME

RUN userdel node
RUN groupadd -g ${GROUP_ID} ${USER_NAME}
RUN useradd \
-u ${USER_ID} \
-g ${GROUP_ID} \
--create-home \
--non-unique \
${USER_NAME}

WORKDIR /app
RUN mkdir -p /output
RUN chmod -R 777 /output
Expand Down Expand Up @@ -53,4 +66,6 @@ ADD package.json /app/package.json
ADD package-lock.json /app/package-lock.json
RUN npm install --quiet

USER ${USER_ID}:${GROUP_ID}

ADD . /app
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
services:
webpack:
build: .
build:
context: .
dockerfile: Dockerfile
args:
USER_ID: ${UID:-1000}
GROUP_ID: ${GID:-1000}
USER_NAME: ${USER:-user}
command: npx webpack --watch --config webpack.dev.js
image: sbe_webpack:latest
volumes:
Expand Down
Loading