adding an small docker reference

This commit is contained in:
Simon Martín 2018-04-27 13:05:52 +02:00
parent dce6349fcb
commit 02b12f370a
2 changed files with 27 additions and 4 deletions

23
docker/reference.md Normal file
View File

@ -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

View File

@ -65,10 +65,10 @@
"preinstall": "make pre-install", "preinstall": "make pre-install",
"test": "make test-all", "test": "make test-all",
"update-internal-deps": "rm -rf node_modules && rm -f yarn.lock && yarn", "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/engine-xenial-pg101",
"docker-pull": "docker pull cartoimages/windshaft-testing", "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-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/engine-xenial-pg101 bash",
"docker-bash": "docker run -it -v `pwd`:/srv cartoimages/windshaft-testing bash" "docker-build": "docker build -t cartoimages/engine-xenial-pg101 -f docker/Dockerfile-xenial-pg101 docker/"
}, },
"engines": { "engines": {
"node": ">=6.9", "node": ">=6.9",