Modify Dockerfile
This commit is contained in:
parent
1225502ca4
commit
118128f2e9
1 changed files with 14 additions and 4 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -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
|
||||
|
||||
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"]
|
||||
Loading…
Add table
Reference in a new issue