Skip to content

Commit

Permalink
fix: docker image building (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Nov 18, 2024
1 parent 5eafe95 commit fb2af26
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
FROM node:20-alpine AS build

RUN npm -g install npm@10

COPY bin bin/
COPY lib lib/
COPY package-lock.json .
COPY package.json .
COPY rollup.config.ts .
COPY tsconfig.json .

RUN npm ci

FROM node:20-alpine
EXPOSE 8001

Expand All @@ -6,16 +19,14 @@ WORKDIR /home/node/app
RUN apk add --no-cache tini
RUN npm -g install npm@10

ADD package.json .
ADD package-lock.json .

RUN npm ci --omit=dev
COPY --from=build dist dist/
COPY public public/
COPY views views/
COPY README.md README.md
COPY package-lock.json .
COPY package.json .

ADD bin bin
ADD lib lib
ADD public public
ADD views views
ADD README.md README.md
RUN npm ci --omit=dev --ignore-scripts

ENTRYPOINT ["tini"]
CMD ["node", "bin/dynamodb-admin.js"]
CMD ["node", "dist/dynamodb-admin.js"]

0 comments on commit fb2af26

Please sign in to comment.