Merge pull request #15 from np22-jpg/main

Update Dockerfile
This commit is contained in:
David Reed 2022-12-11 15:05:15 -05:00 committed by GitHub
commit 3b88a384da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,19 @@
FROM node:current-slim # build app
FROM docker.io/node AS builder
RUN apt update
RUN apt install git
COPY . /app
WORKDIR /app WORKDIR /app
COPY ./package.json ./package-lock.json ./src/ ./ RUN npm install
RUN npm install --omit=dev # build final
FROM gcr.io/distroless/nodejs:16
ENTRYPOINT npm start EXPOSE 8080/tcp
COPY --from=builder /app /
CMD ["src/index.js"]