Skip to content

Commit

Permalink
use assistest user
Browse files Browse the repository at this point in the history
  • Loading branch information
habibimustafa authored Oct 10, 2023
1 parent d3ec410 commit 23c187e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM node:18-slim

RUN mkdir /student-app && chown -R node:node /student-app
RUN mkdir /report && chown -R node:node /report
RUN usermod -aG root node
ARG AGRSGROUP

WORKDIR /app
RUN chown -R node:node /app
RUN groupadd --force -g $AGRSGROUP assistest
RUN useradd -ms /bin/bash --no-user-group -g $AGRSGROUP -u 1337 assistest

ARG AGRSGROUP=1001
RUN mkdir /student-app && chown -R assistest:assistest /student-app
RUN mkdir /report && chown -R assistest:assistest /report
RUN usermod -aG root assistest

RUN groupadd --force -g $AGRSGROUP agrs
RUN usermod -a -G $AGRSGROUP node
WORKDIR /app
RUN chown -R assistest:assistest /app

USER node
USER assistest

COPY --chown=node:node . .
COPY --chown=assistest:assistest . .
RUN npm config set package-lock false
RUN yarn install --production=true

Expand Down

0 comments on commit 23c187e

Please sign in to comment.