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 authored and Red-Asuka committed May 19, 2023
1 parent 96dc501 commit 4f045ff
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 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 4f045ff

Please sign in to comment.