-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cli): reduce the docker image size
- Loading branch information
Showing
1 changed file
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |