-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(container-pull): add ability to add custom tag when copying to a registry #406
feat(container-pull): add ability to add custom tag when copying to a registry #406
Conversation
…a registry Fixes CrowdStrike#405 This PR introduces the `--copy-custom-tag` option for the container pull script that now allows a user to use a custom tag when copying an image to registry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing I would recommend is to come up with a different tag name other than latest.
@@ -743,7 +763,7 @@ if [ "$(is_multi_arch "$FULLIMAGEPATH")" = "true" ]; then | |||
if [ -n "$SENSOR_PLATFORM" ]; then | |||
# If Skopeo is being used, the platform must be overridden | |||
if grep -qw "skopeo" "$CONTAINER_TOOL"; then | |||
"$CONTAINER_TOOL" copy --override-arch "$(platform_override)" "docker://$FULLIMAGEPATH" "docker://$COPYPATH" | |||
"$CONTAINER_TOOL" copy --override-arch "$(platform_override)" --override-os linux "docker://$FULLIMAGEPATH" "docker://$COPYPATH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the override-os meant to be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@redhatrises this is to prevent issues when using skopeo on macOS. W/O this it will think that your <os/platform> is incorrect so this is to ensure we say linux.. This doesn't impact Linux, I tested this and it works the same.
Fixes #405
This PR introduces the
--copy-custom-tag
option for the container pull script that now allows a user to use a custom tag when copying an image to registry.