Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
improved docker image tagging
  • Loading branch information
shukriadams committed Jun 15, 2021
2 parents 32c7f9b + 48fbb43 commit c690478
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
11 changes: 7 additions & 4 deletions build/build-dockerImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,19 @@ if [ $SMOKETEST -eq 1 ]; then
cd --
fi

docker tag shukriadams/arewedown:latest shukriadams/arewedown:$TAG-$ARCH
docker tag shukriadams/arewedown:latest shukriadams/arewedown:$HASH-$ARCH
if [ ! -z $MINOR_TAG ]; then
docker tag shukriadams/arewedown:latest shukriadams/arewedown:$MINOR_TAG-$ARCH
fi

if [ $DOCKERPUSH -eq 1 ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag shukriadams/arewedown:latest shukriadams/arewedown:$TAG-$ARCH
docker tag shukriadams/arewedown:latest shukriadams/arewedown:$HASH

docker push shukriadams/arewedown:$TAG-$ARCH
docker push shukriadams/arewedown:$HASH
docker push shukriadams/arewedown:$HASH-$ARCH

if [ ! -z $MINOR_TAG ]; then
docker tag shukriadams/arewedown:latest shukriadams/arewedown:$MINOR_TAG-$ARCH
docker push shukriadams/arewedown:$MINOR_TAG-$ARCH
fi
fi
Expand Down
29 changes: 15 additions & 14 deletions docs/install-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Docker images are available on [Docker hub](https://hub.docker.com/r/shukriadams

version: "2"
services:
arewedown:
image: shukriadams/arewedown:<TAG>
container_name: arewedown
restart: unless-stopped
volumes:
- ./config:/etc/arewedown/config
- ./logs:/etc/arewedown/logs/:rw
# optional scripts folder, see "custom tests" section of documentation
# - ./scripts:/etc/arewedown/custom-tests
ports:
- "3000:3000"
arewedown:
image: shukriadams/arewedown:<TAG>
container_name: arewedown
restart: unless-stopped
volumes:
- ./config:/etc/arewedown/config
- ./logs:/etc/arewedown/logs/:rw
# - ./scripts:/etc/arewedown/custom-tests # optional, see "custom tests" section of documentation
ports:
- "3000:3000"


- Replace `<TAG>` with the latest two digit tag available, egs `0.2`, or something more specific.
- Two directory volume mounts are required, one for logs, the other for config.
Expand All @@ -26,8 +26,9 @@ Docker images are available on [Docker hub](https://hub.docker.com/r/shukriadams

# Versions and staying up to date

As of release `0.2.4` this project uses the [recommended Docker tagging convention](https://github.com/docker-library/official-images#tags-and-aliases). Each build is marked with a semantic version tag, egs `0.2.4`, which can always be traced back to a [release](https://github.com/shukriadams/arewedown/releases) on Github. Additionally, each build is given a rolling minor tag, for `0.2.4` it would be `0.2`. `0.2` would then move to `0.2.5` when the latter is released, and so on, until `0.3.0` is released, in which case `0.2` would stop being moved. This means you can set your docker orchestration system to use `0.2` and enable automatic updates to stay updated, as new builds will be backward compatible with previous ones.
This project uses the [recommended Docker tagging convention](https://github.com/docker-library/official-images#tags-and-aliases). Each build is marked with a semantic version tag, egs `0.2.4`, which always corresponds to a [release](https://github.com/shukriadams/arewedown/releases) on Github. Additionally, each build is given a rolling minor tag, for `0.2.4` it would be `0.2`. `0.2` would then move to `0.2.5` when the latter is released, and so on, until `0.3.0` is released, in which case `0.2` would stop being moved. This means you can set your docker orchestration system to use `0.2` and enable automatic updates to stay updated, as new builds will be backward compatible with previous ones.

You should avoid auto-updating across minor versions - a minor version increment means a breaking change has been introduced, requiring that you intervene, check the update notes, and possibly change something in your deployment. Yes, software version numbers have a purpose.

You should not autoupdate across minor version changes - a minor version increment means a breaking change has been introduced, requiring that you intervene, read the update notes, and possibly change something in your deployment. Yes, software version numbers have a purpose.
This project does not use the `latest` tag, as this is often misused and misunderstood (there are plenty of posts online explaining why).

This project does not use the `latest` tag, as this is often misused and misunderstood (there are plenty of posts explaining why).

0 comments on commit c690478

Please sign in to comment.