Skip to content
Snippets Groups Projects
Commit 36274d3f authored by Muhammad Hamza Akhtar's avatar Muhammad Hamza Akhtar
Browse files

chore(docker): remove directives for existing user

parent 3a433be2
No related branches found
No related tags found
No related merge requests found
......@@ -22,12 +22,8 @@ FROM node:18.18.2-bullseye-slim
ENV NODE_ENV production
COPY --from=build /usr/bin/dumb-init /usr/bin/dumb-init
# Create a system group named "node" with the -r flag
# Create a system user named "node" and add it to the "node" group with the -r and -g flags
# Create a directory for the lockfile and change the ownership of the directory to the "node" user and group
RUN groupadd -r node \
&& useradd -r -g node node \
&& mkdir /lockfiledir \
RUN mkdir /lockfiledir \
&& chown -R node:node /lockfiledir
WORKDIR /usr/src/app
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment