-
Notifications
You must be signed in to change notification settings - Fork 427
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
Showing
2 changed files
with
35 additions
and
0 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,24 @@ | ||
# Global ARGs | ||
ARG BUILDER_IMAGE=node:16.20 | ||
ARG NGINX_IMAGE=nginx:1.26.1-alpine | ||
ARG WORKSPACE=/workspace | ||
ARG WEB_PATH=/usr/share/nginx/html | ||
|
||
# Builder | ||
FROM $BUILDER_IMAGE as builder | ||
ARG WORKSPACE | ||
|
||
WORKDIR $WORKSPACE | ||
COPY ./ $WORKSPACE/ | ||
RUN npm install \ | ||
&& npm run build \ | ||
&& rm -rf dist \ | ||
&& mkdir dist \ | ||
&& cp -r *.html *.ico LICENSE evolve lib font strings wiki dist | ||
|
||
# Web server | ||
FROM $NGINX_IMAGE | ||
ARG WORKSPACE | ||
ARG WEB_PATH | ||
|
||
COPY --from=builder $WORKSPACE/dist $WEB_PATH |
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