Skip to content

Commit

Permalink
Tag images into localhost namespace
Browse files Browse the repository at this point in the history
'podman tag' tags images into 'localhost/' namespace by default.
We should do this explicitly so that the IMAGE_NAME used is the same
even for docker built images.
  • Loading branch information
pkubatrh committed Sep 13, 2018
1 parent 010fb03 commit 7127096
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ for dir in ${VERSIONS}; do
IMAGE_ID=$(cat .image-id)
name=$(docker inspect -f "{{.ContainerConfig.Labels.name}}" $IMAGE_ID)
version=$(docker inspect -f "{{.ContainerConfig.Labels.version}}" $IMAGE_ID)
version_tag="localhost/$name:$version"
latest_tag="localhost/$name:latest"

echo "-> Tagging image '$IMAGE_ID' as '$name:$version' and '$name:latest'"
docker tag $IMAGE_ID "$name:$version"
docker tag $IMAGE_ID "$name:latest"
echo "-> Tagging image '$IMAGE_ID' as '$version_tag' and '$latest_tag'"
docker tag $IMAGE_ID "$version_tag"
docker tag $IMAGE_ID "$latest_tag"

for suffix in squashed raw; do
id_file=.image-id.$suffix
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for dir in ${VERSIONS}; do
pushd ${dir} > /dev/null
export IMAGE_ID=$(cat .image-id)
# Kept also IMAGE_NAME as some tests might still use that.
export IMAGE_NAME=$(docker inspect -f "{{.ContainerConfig.Labels.name}}" $IMAGE_ID)
export IMAGE_NAME=localhost/$(docker inspect -f "{{.ContainerConfig.Labels.name}}" $IMAGE_ID)

if [ -n "${TEST_MODE}" ]; then
VERSION=$dir test/run
Expand Down

0 comments on commit 7127096

Please sign in to comment.