Skip to content

Commit

Permalink
[build]: Fix docker load image tag not being the expected tag (#12959)
Browse files Browse the repository at this point in the history
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 <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 authored Dec 7, 2022
1 parent 19ec89b commit 6153602
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,11 @@ define docker-image-load
@echo "Obtained docker image lock for $(1) load" $(LOG)
@echo "Loading docker image $(TARGET_PATH)/$(1).gz" $(LOG)
docker load -i $(TARGET_PATH)/$(1).gz $(LOG)
@echo "Tagging docker image $(1):latest as $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG)" $(LOG)
docker tag $(1):latest $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG) $(LOG)
@echo "Tagging docker image $(1):$(call docker-get-tag,$(1)) as $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG)" $(LOG)
docker tag $(1):$(call docker-get-tag,$(1)) $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG) $(LOG)
if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then
@echo "Removing docker image $(1):latest" $(LOG)
docker rmi -f $(1):latest $(LOG)
docker rmi -f $(1):$(call docker-get-tag,$(1)) $(LOG)
fi
$(call MOD_UNLOCK,$(1))
@echo "Released docker image lock for $(1) load" $(LOG)
Expand Down

0 comments on commit 6153602

Please sign in to comment.