Skip to content

Commit

Permalink
Run as bored user within container (#140)
Browse files Browse the repository at this point in the history
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
  • Loading branch information
jakolehm committed Nov 24, 2021
1 parent be29ad7 commit 1ae3af4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ RUN apk add --update python3 gcc g++ make && \

FROM node:14-alpine

RUN mkdir /app
RUN mkdir /app \
&& addgroup -S bored && adduser -S bored -G bored
WORKDIR /app

COPY package.json yarn.lock ./
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist

USER bored
ENTRYPOINT [ "/usr/local/bin/node" ]
CMD ["/app/dist/index.js"]

0 comments on commit 1ae3af4

Please sign in to comment.