Fix Dockerfile

This commit is contained in:
2024-08-30 13:57:55 +00:00
parent b916b7cbad
commit 83a4bc3fdd
2 changed files with 12 additions and 6 deletions

View File

@@ -1,6 +1,10 @@
FROM node:22.4-slim
FROM node:22.4-slim AS build
WORKDIR /work
COPY ./package.json ./package-lock.json .
RUN npm install
COPY ./ .
CMD ["npx", "ts-node", "index.ts"]
COPY . /work
RUN npm ci && npm run build
FROM gcr.io/distroless/nodejs22-debian12
WORKDIR /work
COPY --from=build /work /work
CMD ["index.js"]