Update Dockerfile

This commit is contained in:
Kaindl Network 2023-04-07 14:48:26 +00:00 committed by GitHub
parent 7eeded4a95
commit ac35d8854f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,22 @@
FROM gcr.io/distroless/nodejs:18
WORKDIR /home/node/app
# Prepare Nodejs Project
FROM node:18 AS builder
COPY package*.json ./
WORKDIR /home/node/app
RUN npm ci
COPY . .
# Copy build and put it in distroless Image
FROM gcr.io/distroless/nodejs:18
COPY --from=builder /home/node/app /home/node/app
WORKDIR /home/node/app
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \