-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b747b3
commit af60876
Showing
1 changed file
with
10 additions
and
4 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,15 +1,21 @@ | ||
FROM node:latest | ||
FROM node:latest AS build | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY package.json package-lock.json ./ | ||
|
||
RUN npm install | ||
|
||
RUN npm install -g serve | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM node:alpine AS serve | ||
|
||
RUN npm install -g serve | ||
|
||
COPY --from=build /app/dist /app/dist | ||
|
||
WORKDIR /app | ||
|
||
ENTRYPOINT ["serve", "-s", "dist"] |