diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..6355d8c --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,5 @@ +FROM node:12-alpine + +COPY . /src +WORKDIR /src +RUN npm install -g live-server diff --git a/docker/run_docker.sh b/docker/run_docker.sh new file mode 100644 index 0000000..ff5ef2b --- /dev/null +++ b/docker/run_docker.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +docker run -it \ + -d \ + --rm \ + --name imglab \ + -p 8080:8080 \ + -w /src/ \ + francozacco/imglab:latest live-server \ No newline at end of file diff --git a/docs/guide.md b/docs/guide.md index 689731a..ef2ea1c 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -100,4 +100,15 @@ To use it offline, you can either download installers or clone this repo and run 3. Run `$ live-server` in /imglab/ folder. 4. Open your browser (if it hasn't popped up already) at: `http://127.0.0.1:8080/` -*Note that* [live-server](https://www.npmjs.com/package/live-server) is just an app to run the server in easy way. You may try any other option as well. \ No newline at end of file +*Note that* [live-server](https://www.npmjs.com/package/live-server) is just an app to run the server in easy way. You may try any other option as well. + +#### Installing Dockerized version + +Assuming you installed Docker on your computer, follow below instructions. + +1. run `$ docker run -it -d --rm --name imglab -p 8080:8080 -w /src/ francozacco/imglab:latest live-server` and wait until the docker container is up and running. +2. Go to your browser and go to `http://127.0.0.1:8080/` + +#### Stopping the docker container + +Just run `docker kill imglab`, and that's it.