Last active
August 8, 2023 17:30
-
-
Save osher/2123872d2445331111a30665922c00de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:alpine-lts | |
WORKDIR /app | |
COPY packge.json . | |
RUN npm i --production | |
FROM alpine | |
RUN apk update \ | |
&& apk upgrade --no-cache \ | |
&& apk add --no-cache nodejs \ | |
&& rm -r /**/apk /**/**/apk | |
WORKDIR /app | |
COPY --from=0 /app / | |
COPY . /app/ | |
RUN addgroup -S service \ | |
&& adduser -S service -G service | |
USER service | |
EXPOSE 3000/tcp | |
ENTRYPOINT ["node", "index.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment