Skip to content

Commit

Permalink
feat: use distroless base image
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianScheidt committed Aug 5, 2024
1 parent d3a46a4 commit 7f8bf52
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# compiled output
/dist
/node_modules
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
FROM node:18

FROM node:20 AS build-env
WORKDIR /app/

COPY package.json yarn.lock /app/
RUN yarn install

COPY ./ /app/
RUN yarn build

FROM gcr.io/distroless/nodejs20-debian11
WORKDIR /app/

COPY --from=build-env /app/node_modules /app/node_modules
COPY --from=build-env /app/dist /app/dist

CMD ["yarn", "start"]
CMD ["./dist/main.js"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fabianscheidt/did-document-solution",
"description": "Signs DID documents, stores them and makes them available through did:web.",
"version": "1.3.0",
"version": "1.4.0",
"main": "index.ts",
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit 7f8bf52

Please sign in to comment.