Skip to content

Commit 083a669

Browse files
saiarcot895mssonicbld
authored andcommitted
[build]: Fix docker load image tag not being the expected tag (#12959)
PR #12829 modified the docker tagging scheme such that optional docker containers would be tagged with the SONiC image version. However, the docker-image-load macro wasn't updated for these changes. Update it here. Signed-off-by: Saikrishna Arcot <[email protected]>
1 parent 6a718a3 commit 083a669

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

slave.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,11 @@ define docker-image-load
427427
@echo "Obtained docker image lock for $(1) load" $(LOG)
428428
@echo "Loading docker image $(TARGET_PATH)/$(1).gz" $(LOG)
429429
docker load -i $(TARGET_PATH)/$(1).gz $(LOG)
430-
@echo "Tagging docker image $(1):latest as $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG)" $(LOG)
431-
docker tag $(1):latest $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG) $(LOG)
430+
@echo "Tagging docker image $(1):$(call docker-get-tag,$(1)) as $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG)" $(LOG)
431+
docker tag $(1):$(call docker-get-tag,$(1)) $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG) $(LOG)
432432
if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then
433433
@echo "Removing docker image $(1):latest" $(LOG)
434-
docker rmi -f $(1):latest $(LOG)
434+
docker rmi -f $(1):$(call docker-get-tag,$(1)) $(LOG)
435435
fi
436436
$(call MOD_UNLOCK,$(1))
437437
@echo "Released docker image lock for $(1) load" $(LOG)

0 commit comments

Comments
 (0)