Skip to content

Commit

Permalink
feat: switch to distroless
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorwolf committed Dec 4, 2022
1 parent 416491b commit e4e6906
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM node:16-buster-slim
FROM node:16 AS build-env
WORKDIR /app

RUN apt-get update && apt-get upgrade -y && nodejs -v && npm -v
WORKDIR /usr/src/app
COPY package.json .
COPY package-lock.json .
RUN npm ci
COPY xs-app.json .
COPY webapp webapp/
RUN find app -name '*.cds' | xargs rm -f

FROM gcr.io/distroless/nodejs:16
COPY --from=build-env /app /app
WORKDIR /app
EXPOSE 5000
USER node
CMD [ "npm", "start" ]
ENV NODE_ENV=production
CMD [ "npm", "start" ]

0 comments on commit e4e6906

Please sign in to comment.