-
Notifications
You must be signed in to change notification settings - Fork 108
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
be3c199
commit c370353
Showing
1 changed file
with
14 additions
and
13 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,16 @@ | ||
# Build stage | ||
FROM trion/ng-cli-karma AS builder | ||
LABEL maintainer="[email protected],[email protected]" | ||
USER 1000 | ||
WORKDIR /tmp | ||
# copy app files | ||
FROM node:16-alpine AS build-stage | ||
WORKDIR /app | ||
|
||
COPY package.json ./ | ||
COPY package-lock.json ./ | ||
RUN npm ci | ||
|
||
COPY . . | ||
# install node packages | ||
RUN npm install && \ | ||
#build package | ||
npm run all | ||
|
||
FROM nginx:stable-alpine | ||
LABEL maintainer="[email protected],[email protected]" | ||
COPY --from=builder --chown=101:101 /tmp/dist /usr/share/nginx/html | ||
|
||
RUN npm run bundle | ||
|
||
|
||
# Runtime stage | ||
FROM nginx:1.22-alpine | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html |