Parcourir la source

Add Dockerfile

Add a simple Dockerfile to allow people running using Docker.
Later this Dockerfile could be used in a GitHub action to provide
and official Docker image.
Juan Carlos Alonso il y a 3 ans
Parent
commit
8185a9c620
2 fichiers modifiés avec 27 ajouts et 0 suppressions
  1. 18 0
      Dockerfile
  2. 9 0
      README.md

+ 18 - 0
Dockerfile

@@ -0,0 +1,18 @@
+# Builder
+FROM node:14-buster as builder
+
+WORKDIR /src
+
+COPY . /src
+
+RUN npm install --legacy-peer-deps
+
+RUN npm run build
+
+# App
+FROM nginx:alpine
+
+COPY --from=builder /src/out /app
+
+RUN rm -rf /usr/share/nginx/html \
+  && ln -s /app /usr/share/nginx/html

+ 9 - 0
README.md

@@ -54,6 +54,15 @@ JSON Visio is data visualization tool for your json data which seamlessly illust
   <img width="800" src="https://github.com/AykutSarac/jsonvisio.com/blob/main/public/preview_2.png" alt="preview 1" />
   </div>
 
+## Docker
+
+A Docker file is provided in the root of the repo.
+If you want to run JsonVision locally:
+
+* Build Docker image with `docker build -t jsonvisio.`
+* Run locally with `docker run -p 8888:80 jsonvisio`
+* Go to [http://localhost:8888]
+
 ## 🛠 Development Setup
 
 ```sh