Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

* `latest` [(*/build/Dockerfile*)][dockerfile-build-link], [(*/update/Dockerfile*)][dockerfile-update-link]
* `<version>` [(*/build/Dockerfile*)][dockerfile-build-link]
* `<version>-<date>` [(*/build/Dockerfile*)][dockerfile-build-link]
* `<version>-layered` [(*/update/Dockerfile*)][dockerfile-update-link]
* `<version>-layered-<date>` [(*/update/Dockerfile*)][dockerfile-update-link]

Expand Down Expand Up @@ -172,7 +173,7 @@ Dedicated servers hosted on Steam are usually required to be running the *latest

### Game versions & tags

A *layered* image of a game is but a *clean* image compounded with game update layers. *Clean* images are tagged by `<version>`, while *layered* images are tagged by `<version>-layered` and `<version>-layered-<date>`.
A *layered* image of a game is but a *clean* image compounded with game update layers. *Clean* images are tagged by `<version>` and `<version>-<date>`, while *layered* images are tagged by `<version>-layered` and `<version>-layered-<date>`.

The `latest` tag of each game points to the game's newest *layered* image unless a newer *clean* image has been built with the `latest` tag. Thus, by using the `latest` tag, *layered* images are almost always used, circumventing the need to pull entire *clean* images for obtaining game updates.

Expand Down
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ else
fi
if [ "$PIPELINE" = 'build' ]; then
GAME_IMAGE_CLEAN="$DOCKER_REPOSITORY:$GAME_VERSION"
GAME_IMAGE_CLEAN_CALVER="$GAME_IMAGE_CLEAN-$( date -u '+%Y%m%d' )"
BUILD_CONTEXT='build/'
elif [ "$PIPELINE" = 'update' ]; then
GAME_IMAGE_LAYERED="$DOCKER_REPOSITORY:$GAME_VERSION-layered"
Expand Down Expand Up @@ -245,6 +246,7 @@ if [ "$PIPELINE" = 'build' ]; then
--build-arg STEAM_LOGIN="$STEAM_LOGIN" \
--build-arg CACHE_KEY="$GAME_VERSION" \
-t "$GAME_IMAGE_CLEAN" \
-t "$GAME_IMAGE_CLEAN_CALVER" \
--label "appid=$APPID" \
--label "mod=$MOD" \
--label "client_appid=$CLIENT_APPID" \
Expand Down Expand Up @@ -339,6 +341,7 @@ if [ ! "$NO_PUSH" = 'true' ]; then
date -Iseconds
if [ "$PIPELINE" = 'build' ]; then
time docker push "$GAME_IMAGE_CLEAN"
time docker push "$GAME_IMAGE_CLEAN_CALVER"
if [ "$LATEST" = 'true' ]; then
time docker push "$GAME_IMAGE_LATEST"
fi
Expand Down