Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docker image building #448

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading