Skip to content

Commit

Permalink
chore(cli): reduce the docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed May 18, 2023
1 parent 96dc501 commit 75b1913
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
FROM node:16-alpine
FROM node:16-alpine AS build

WORKDIR /app

COPY package.json yarn.lock ./

RUN yarn --frozen-lockfile

COPY . ./

RUN yarn && yarn build && yarn link
RUN yarn && yarn build

FROM node:16-alpine AS runtime

WORKDIR /app

COPY --from=build /app .

RUN yarn link

CMD /bin/bash
CMD /bin/ash

0 comments on commit 75b1913

Please sign in to comment.