-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding 3-stage docker build to generate the build and demopage container
- Loading branch information
Showing
6 changed files
with
27 additions
and
182 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules/ | ||
/demopage/node_modules/ |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -------- Stage 1 - Develop Container | ||
FROM node:12 AS develop | ||
VOLUME ["/usr/src/app"] | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
chromium | ||
|
||
# -------- Stage 2 - Build Container | ||
FROM develop AS builder | ||
COPY ./ /build/ | ||
WORKDIR /build | ||
RUN npm install | ||
RUN npm run build | ||
RUN npm test | ||
|
||
WORKDIR /build/demopage | ||
RUN npm install | ||
RUN npm run build | ||
|
||
|
||
# -------- Stage 3 - Demopage serve container | ||
FROM httpd:2.4 | ||
COPY --from=builder /build/demopage/dist/ /usr/local/apache2/htdocs/ |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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