From 684dbd1fc27ed9adecadac0c911e7cf58568771d Mon Sep 17 00:00:00 2001 From: Markku Riekkinen Date: Thu, 24 Feb 2022 17:13:19 +0200 Subject: [PATCH] Add Docker Hub push hook to fix the build of the huey container Even though the build hook builds both the web app and Huey worker containers, the Huey container is not pushed to the registry and it is thus lost. Adding the push hook should fix this. The new push hook pushes all layers of the container. --- docker/hooks/build | 0 docker/hooks/push | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) mode change 100644 => 100755 docker/hooks/build create mode 100755 docker/hooks/push diff --git a/docker/hooks/build b/docker/hooks/build old mode 100644 new mode 100755 diff --git a/docker/hooks/push b/docker/hooks/push new file mode 100755 index 0000000..8a278c7 --- /dev/null +++ b/docker/hooks/push @@ -0,0 +1,16 @@ +#!/bin/sh + +ver=${DOCKER_TAG##*-} +if [ "$ver" -a "$ver" = "$DOCKER_TAG" ]; then + ver="$DOCKER_TAG" +fi + +for layer in "" "huey"; do + if [ "$layer" ]; then + tag="${layer}-${ver}" + else + tag="$ver" + fi + docker push "$DOCKER_REPO":"$tag" +done +