Skip to content

Commit 60dea75

Browse files
Since DOCKER_SONIC_MGMT contains latest keyword, no need to add latest keyword again in check
1 parent c6c4fae commit 60dea75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup-container.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ function pull_sonic_mgmt_docker_image() {
157157
DOCKER_IMAGES_CMD="docker images --format \"{{.Repository}}:{{.Tag}}\""
158158
DOCKER_PULL_CMD="docker pull \"${DOCKER_REGISTRY}/${DOCKER_SONIC_MGMT}\""
159159

160-
if eval "${DOCKER_IMAGES_CMD}" | grep -q "^${DOCKER_SONIC_MGMT}:latest$"; then
160+
if eval "${DOCKER_IMAGES_CMD}" | grep -q "^${DOCKER_SONIC_MGMT}$"; then
161161
IMAGE_ID="${DOCKER_SONIC_MGMT}"
162-
elif eval "${DOCKER_IMAGES_CMD}" | grep -q "^${DOCKER_REGISTRY}/${DOCKER_SONIC_MGMT}:latest$"; then
162+
elif eval "${DOCKER_IMAGES_CMD}" | grep -q "^${DOCKER_REGISTRY}/${DOCKER_SONIC_MGMT}$"; then
163163
IMAGE_ID="${DOCKER_REGISTRY}/${DOCKER_SONIC_MGMT}"
164164
elif log_info "pulling docker image from a registry ..." && eval "${DOCKER_PULL_CMD}"; then
165165
IMAGE_ID="${DOCKER_REGISTRY}/${DOCKER_SONIC_MGMT}"

0 commit comments

Comments
 (0)