forked from mermaid-js/mermaid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from mvandermade/add-Dockerfile
Create a two-stage docker file so you can easily build and run the project
- Loading branch information
Showing
1 changed file
with
18 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,18 @@ | ||
# Two-stage docker container for mermaid-js/mermaid-live-editor | ||
# Build : docker build -t mermaid-js/mermaid-live-editor . | ||
# Run : docker run --name mermaid-live-editor --publish 8080:80 mermaid-js/mermaid-live-editor | ||
# Start : docker start mermaid-live-editor | ||
# Use webbrowser : http://localhost:8080 | ||
# Stop : press ctrl + c | ||
# or | ||
# docker stop mermaid-live-editor | ||
|
||
|
||
FROM node:13.6.0-alpine as mermaid-live-editor-builder | ||
COPY --chown=node:node . /home | ||
WORKDIR /home | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
FROM nginx:alpine as mermaid-live-editor-runner | ||
COPY --from=mermaid-live-editor-builder --chown=nginx:nginx /home/docs /usr/share/nginx/html |