Skip to content

Commit f8b7086

Browse files
committed
pause image: Stricter registry prefix regex
1 parent 53b2973 commit f8b7086

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build/pause/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ push-manifest:
8888
# For Windows images, we also need to include the "os.version" in the manifest list, so the Windows node can pull the proper image it needs.
8989
# At the moment, docker manifest annotate doesn't allow us to set the os.version, so we'll have to it ourselves. The manifest list can be found locally as JSONs.
9090
# See: https://github.com/moby/moby/issues/41417
91+
# If the ${REGISTRY} is on dockerhub, the prefix "docker.io/" is optional. However, we need the full
92+
# registry name for setting the os.version for Windows images below.
93+
# If the registry name does not contain any slashes, we prepend "docker.io/"
9194
# TODO(claudiub): Clean this up once the above issue has been fixed.
9295
set -x; \
93-
registry_prefix=$(shell (echo ${REGISTRY} | grep -Eq "[a-z]*") && echo "docker.io/" || echo ""); \
96+
registry_prefix=$(shell (echo ${REGISTRY} | grep -Eq ".*\/.*") && echo "" || echo "docker.io/"); \
9497
manifest_image_folder=`echo "$${registry_prefix}${IMAGE}" | sed "s|/|_|g" | sed "s/:/-/"`; \
9598
for arch in $(ALL_ARCH.windows); do \
9699
for osversion in ${ALL_OSVERSIONS.windows}; do \

0 commit comments

Comments
 (0)