Readme updates, build cache tag change

This commit is contained in:
Deon George 2018-08-24 15:03:23 +10:00
parent 2a0e74693e
commit 218d1f593f
2 changed files with 12 additions and 7 deletions

View File

@ -5,7 +5,7 @@ stages:
- build - build
variables: variables:
VERSION: 1.12a39-armv7l VERSION: 1.12a39-${CI_COMMIT_REF_NAME}
CACHETAG: build CACHETAG: build
DOCKER_HOST: tcp://docker:2375 DOCKER_HOST: tcp://docker:2375
@ -36,7 +36,7 @@ build:
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}-${CI_COMMIT_REF_NAME}
tags: tags:
- docker-armv7l - docker-armv7l
only: only:

View File

@ -27,18 +27,21 @@ To use this container:
3. Start the container. 3. Start the container.
docker run -itd -v /srv/mystic/data:/mystic data -p 10022:22 -p 10023:23 -p 24554:24554 registry.leenooks.net/leenooks/mysticbbs:1.12a39-armv7l docker run -itd -v /srv/mystic/data:/mystic/data -p 10022:22 -p 10023:23 -p 24554:24554 registry.leenooks.net/leenooks/mysticbbs:1.12a39-armv7l
Explanation of these parameters: Explanation of these parameters:
| Parameter | Value | | Parameter | Value |
| :- | :-- | | :- | :-- |
| -d | Detached mode: run the container in the background and print the new container ID. | | -d | Detached mode: run the container in the background and print the new container ID. |
| -i | Keep STDIN open even if not attached. | | -i | Keep STDIN open even if not attached. (required) |
| -n | Give your container a specific name. | | -n | Give your container a specific name. (optional) |
| -p | Map host ports to container ports. | | -p | Map host ports to container ports. (may be required, otherwise recommended) |
| -t | Allocate a pseudo-TTY. | | -t | Allocate a pseudo-TTY. (required) |
| -v | Map a path on the host into the container (optional but recommended). |
(There are other useful parameters you can use, like --restart, etc. If you dont pass in a data volume for /mystic/data, docker will create one and preserve it if you start subsequent containers a specific way (beyond the scope of this README - so its recommended you do this in first instance anyway.)
Remember your container ID *(your number will be different)*. Remember your container ID *(your number will be different)*.
ca219a461376... ca219a461376...
@ -56,3 +59,5 @@ To use this container:
If you want to monitor your container, or stop it, attach to the console with: If you want to monitor your container, or stop it, attach to the console with:
docker attach ca219a461376 docker attach ca219a461376
You can also run this in a swarm (I do)!