diff options
Diffstat (limited to 'tools/build_defs/docker/incremental_load.sh.tpl')
-rw-r--r-- | tools/build_defs/docker/incremental_load.sh.tpl | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/tools/build_defs/docker/incremental_load.sh.tpl b/tools/build_defs/docker/incremental_load.sh.tpl index c607380d15..2210ceb913 100644 --- a/tools/build_defs/docker/incremental_load.sh.tpl +++ b/tools/build_defs/docker/incremental_load.sh.tpl @@ -56,27 +56,17 @@ function incr_load() { fi } -function tag_layer() { - if [ "$LEGACY_DOCKER" = true ]; then - name=$(cat ${RUNFILES}/$2) - else - name=$(cat ${RUNFILES}/$3) - fi +# List of 'incr_load' statements for all layers. +# This generated and injected by docker_build. +%{load_statements} - TAG="$1" +# Tag the last layer. +if [ -n "${name}" ]; then + TAG="${1:-%{repository}:%{tag}}" echo "Tagging ${name} as ${TAG}" if [ "$LEGACY_DOCKER" = true ]; then "${DOCKER}" tag -f ${name} ${TAG} else "${DOCKER}" tag ${name} ${TAG} fi -} - -# List of 'incr_load' statements for all layers. -# This generated and injected by docker_build. -%{load_statements} - -# List of 'tag_layer' statements for all tags. -# This generated and injected by docker_build. -%{tag_statements} - +fi |