Skip to content

Commit

Permalink
chore: node dockerfile updated
Browse files Browse the repository at this point in the history
  • Loading branch information
spchortis committed Sep 13, 2023
1 parent b4910a3 commit 6b91d57
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions assets/docker/Dockerfile.node.tmpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM node:{{ or .RuntimeVersion .DefaultRuntimeVersion }} AS build-env
COPY . /src
WORKDIR /src

WORKDIR /app

COPY package*.json tsconfig*.json ./

RUN {{ .NodeInstallCommand }}

COPY . /app

RUN npm run build --if-present
RUN npm test

FROM gcr.io/distroless/nodejs20-debian11
COPY --from=build-env /src /src
COPY --from=build-env /app /src
WORKDIR /src
CMD ["index.js"]
ENTRYPOINT ["index.js"]

0 comments on commit 6b91d57

Please sign in to comment.