diff --git a/Makefile b/Makefile index 01b97e9..a7fdaa5 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ # NOTE: The version for both `imageswap-init` and `imageswap` should be identical for now. # Some effort will need to be put in to be able to distringuish changes to one vs. the other # in CI/Release steps. -IMAGESWAP_VERSION := v1.5.3 -IMAGESWAP_INIT_VERSION := v1.5.3 +IMAGESWAP_VERSION := v1.5.4 +IMAGESWAP_INIT_VERSION := v1.5.4 REPO_ROOT := $(CURDIR) APP_NAME ?= "imageswap.py" diff --git a/app/imageswap/imageswap.py b/app/imageswap/imageswap.py index 3976cab..0249622 100755 --- a/app/imageswap/imageswap.py +++ b/app/imageswap/imageswap.py @@ -274,6 +274,12 @@ def swap_image(container_spec): no_registry = False library_image = False + # special case when the image is a library image but also has docker.io + # example: 'docker.io/alpine:latest' + if image_split[0] == "docker.io" and "/" not in image_split[2]: + image = image.replace("docker.io/", "") + image_split = image.partition("/") + # Check if first section is a Registry URL if "." in image_split[0] and image_split[1] != "" and image_split[2] != "": image_registry = image_split[0]