Skip to content

Commit

Permalink
Modify Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
np22-jpg committed Dec 11, 2022
1 parent 1225502 commit 118128f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
FROM node:current-slim
# build app
FROM docker.io/node:current-alpine3.15 AS builder

RUN apk update
RUN apk add git

COPY . /app
WORKDIR /app

COPY ./package.json ./package-lock.json ./src/ ./
RUN npm install

# build final
FROM gcr.io/distroless/nodejs:16

EXPOSE 8080/tcp

RUN npm install --omit=dev
COPY --from=builder /app /

ENTRYPOINT npm start
CMD ["src/index.js"]

0 comments on commit 118128f

Please sign in to comment.