[FEAT] allow namespacing image with localhost/
to target local podman images
#100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Podman stores locally built images aslocalhost/${IMAGE}
, so we should prependlocalhost/
to the image name to ensure we target the correct image.This PR makes sure to sanitize the
destinationImage
if it is namespaced withlocalhost/
so that it is pushed to the right location.Currently, if images are namespaced as
localhost/{IMAGE}
, they are pushed either toregistry/localhost/image
, orregistry/namespace/localhost/{IMAGE}
if the registry is provided with a namespace.Namespacing images as
localhost/
also allows always targeting the podman image even if a docker image was built more recently as docker does not uselocalhost/
as a namespace. However, the PR currently sanitizes the image name so that it can be pulled from the docker daemon, but if this functionality is wanted, I can revert the changes on line 304 and line 307Related Issue(s)
This may fix #66 by allowing a user to specifically target a local image
Checklist
Changes made
localhost/
and sanitize the destination image