Skip to content

Commit

Permalink
feat: smaller docker image with nft
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Mar 10, 2021
1 parent 1aa6305 commit eeb0f3c
Show file tree
Hide file tree
Showing 5 changed files with 434 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM node:lts-alpine as ts-builder
WORKDIR /app
COPY . /app
RUN npm install --ignore-scripts && npm run build
RUN npm i -g npm && npm ci --ignore-scripts && npm run build

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

FROM node:lts-alpine as app
WORKDIR /app
Expand Down
Loading

0 comments on commit eeb0f3c

Please sign in to comment.