Skip to content

Commit eeb0f3c

Browse files
committed
feat: smaller docker image with nft
1 parent 1aa6305 commit eeb0f3c

File tree

5 files changed

+434
-5
lines changed

5 files changed

+434
-5
lines changed

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
FROM node:lts-alpine as ts-builder
22
WORKDIR /app
33
COPY . /app
4-
RUN npm install --ignore-scripts && npm run build
4+
RUN npm i -g npm && npm ci --ignore-scripts && npm run build
55

66
FROM node:lts-alpine as dep-builder
77
WORKDIR /app
8-
COPY package.json clean-nm.sh /app/
8+
COPY package.json package-lock.json /app/
9+
COPY tools /app/tools
910
RUN apk add --no-cache --update build-base python2
10-
RUN npm i -g npm && npm install --production && sh /app/clean-nm.sh
11+
COPY --from=ts-builder /app/dist /app/dist
12+
RUN npm i -g npm && npm ci && node tools/minify-docker.js
1113

1214
FROM node:lts-alpine as app
1315
WORKDIR /app

0 commit comments

Comments
 (0)