From 2812c72d964cb8c04aefc29a5c570dfd65a1f3ae Mon Sep 17 00:00:00 2001 From: Chris Sng Date: Wed, 9 Nov 2016 22:08:38 +0800 Subject: [PATCH] - Added a Dockerfile to allow the editor to be served using docker containers - Updated README with docker instructions --- Dockerfile | 15 +++++++++++++++ README.md | 22 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2153286 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM nodesource/xenial:6.1.0 + +EXPOSE 8888 + +ENV HOME /maputnik +RUN mkdir ${HOME} + +COPY . ${HOME}/ + +WORKDIR ${HOME} + +RUN npm install -d --dev +RUN npm run build + +CMD npm run start -- --host 0.0.0.0 diff --git a/README.md b/README.md index f73b224..3e9bdc6 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,26 @@ npm install --save-dev eslint eslint-plugin-react npm run lint ``` +## Docker + +Build the docker image + +``` +docker build -t maputnik/editor . +``` + +Start a docker container using the image + +``` +docker run --name maputnik -p 8888:8888 -d maputnik/editor +``` + +Stop the container + +``` +docker stop maputnik +``` + ## Sponsors This project would not be possible without commercial and individual sponsors. @@ -102,7 +122,7 @@ This project would not be possible without commercial and individual sponsors. - Uli [geOps](http://geops.ch/) - Helge Fahrnberger Kirusanth Poopalasingam - + **Stakeholder** - Brian Flood