From 02b12f370a8742e5b97d8a19b1836574aed8ed4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Mart=C3=ADn?= Date: Fri, 27 Apr 2018 13:05:52 +0200 Subject: [PATCH] adding an small docker reference --- docker/reference.md | 23 +++++++++++++++++++++++ package.json | 8 ++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 docker/reference.md diff --git a/docker/reference.md b/docker/reference.md new file mode 100644 index 00000000..50e135dd --- /dev/null +++ b/docker/reference.md @@ -0,0 +1,23 @@ +After running the tests with docker, you will need Docker installed and the docker image downloaded. + +## Install docker +`sudo apt install docker.io && sudo usermod -aG docker $(whoami)` + +## Download image +`docker pull cartoimages/engine-xenial-pg101` + +## Update image +- Edit the docker image file with your desired changes +- Build image: + - `docker build -t cartoimages/engine-xenial-pg101 -f docker/Dockerfile-xenial-pg101 docker/` +- Upload to docker hub: + - Login into docker hub: + - `docker login` + - Create tag: + - `docker tag cartoimages/engine-xenial-pg101 cartoimages/engine-xenial-pg101` + - Upload: + - `docker push cartoimages/engine-xenial-pg101` + + +## Useful commands +We have some useful commands created in package.json \ No newline at end of file diff --git a/package.json b/package.json index fce46f9d..ad5ee9c9 100644 --- a/package.json +++ b/package.json @@ -65,10 +65,10 @@ "preinstall": "make pre-install", "test": "make test-all", "update-internal-deps": "rm -rf node_modules && rm -f yarn.lock && yarn", - "docker-install": "sudo apt install docker.io && sudo usermod -aG docker $(whoami)", - "docker-pull": "docker pull cartoimages/windshaft-testing", - "docker-test": "docker run -v `pwd`:/srv cartoimages/windshaft-testing bash docker-test.sh && docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v", - "docker-bash": "docker run -it -v `pwd`:/srv cartoimages/windshaft-testing bash" + "docker-pull": "docker pull cartoimages/engine-xenial-pg101", + "docker-test": "docker run -v `pwd`:/srv cartoimages/engine-xenial-pg101 bash docker-test.sh && docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v", + "docker-bash": "docker run -it -v `pwd`:/srv cartoimages/engine-xenial-pg101 bash", + "docker-build": "docker build -t cartoimages/engine-xenial-pg101 -f docker/Dockerfile-xenial-pg101 docker/" }, "engines": { "node": ">=6.9",