Underscores not handled correctly in docker tags with Nexus bundler
Description
When pulling docker images using hoppr/nexus bundler plugin, images that have a tag with an underscore are improperly imported into Nexus. As an example the longhorn-instance-manager image tag v1_20220303 will ultimately appear in the Nexus instance as /longhornio/longhorn-instance-manager_v1:20220303
instead of what the original is tagged as /longhornio/longhorn-instance-manager:v1_20220303
What did you expect to happen?
The image tag to match what was ordinally pulled docker pull longhornio/longhorn-instance-manager:v1_20220303
What happened instead?
The image that gets loaded into Nexus is /longhornio/longhorn-instance-manager_v1:20220303
instead of what was pulled
--verbose
:
Output of run with [2023-05-30 20:03:49,785] - [CollectDockerPlugin--1060-89] - [DEBUG] - Starting CollectDockerPlugin.process_component (purl: pkg:docker/ext.hub.docker.com/longhornio/longhorn-instance-manager@v1_20220303)
[2023-05-30 20:03:49,785] - [CollectDockerPlugin--1060-89] - [INFO] - ---- Component: longhorn-instance-manager@v1_20220303 --------------------------------------------------
[2023-05-30 20:03:49,786] - [CollectDockerPlugin--1060-89] - [INFO] - Repository: *********
[2023-05-30 20:03:49,786] - [CollectDockerPlugin--1060-89] - [INFO] - Processing component [attempt 1 of 3]
[2023-05-30 20:03:49,786] - [CollectDockerPlugin--1060-89] - [INFO] - Copying docker image:
[2023-05-30 20:03:49,787] - [CollectDockerPlugin--1060-89] - [INFO] - source: docker://longhornio/longhorn-instance-manager:v1_20220303
[2023-05-30 20:03:49,787] - [CollectDockerPlugin--1060-89] - [INFO] - destination: docker-archive:/tmp/tmp3918_mvj/docker/https%3A%2F%2F/longhornio/longhorn-instance-manager_v1_20220303:/longhornio/longhorn-instance-manager:v1_20220303
[2023-05-30 20:03:49,787] - [CollectDockerPlugin--1060-89] - [DEBUG] - Running command: 'skopeo copy docker:///longhornio/longhorn-instance-manager:v1_20220303 docker-archive:/tmp/tmp3918_mvj/docker/https%3A%2F%2F/longhornio/longhorn-instance-manager_v1_20220303:longhornio/longhorn-instance-manager:v1_20220303'
[2023-05-30 20:05:27,412] - [CollectDockerPlugin--1060-89] - [DEBUG] - Completed CollectDockerPlugin.process_component
[2023-05-30 20:05:27,412] - [CollectDockerPlugin--1060-89] - [DEBUG] - Process duration 97.658217 seconds
[2023-05-30 20:05:27,412] - [CollectDockerPlugin--1060-89] - [INFO] - Result: 'SUCCESS'
[2023-05-30 20:48:07,773] - [pub--DockerPublisher--11838-8] - [INFO] - >>> Started publish to Nexus for /tmp/tmp3918_mvj/docker/https%3A%2F%2F/longhornio/longhorn-instance-manager_v1_20220303
[2023-05-30 20:48:07,773] - [pub--DockerPublisher--11838-8] - [INFO] - Processing component [attempt 1 of 3]
[2023-05-30 20:48:07,842] - [pub--DockerPublisher--11838-8] - [INFO] - Processing component [attempt 1 of 3]
[2023-05-30 20:48:10,087] - [pub--DockerPublisher--11838-8] - [INFO] - Repository transfer-docker already exists with format docker, was not re-created
[2023-05-30 20:48:10,110] - [pub--DockerPublisher--11838-8] - [INFO] - Processing component [attempt 1 of 3]
[2023-05-30 20:58:53,825] - [pub--DockerPublisher--11838-8] - [INFO] - Complete docker artifact copy for /tmp/tmp3918_mvj/docker/https%3A%2F%2F/longhornio/longhorn-instance-manager_v1_20220303
[2023-05-30 20:58:53,955] - [pub--DockerPublisher--11838-8] - [INFO] - Completed publish for /tmp/tmp3918_mvj/docker/https%3A%2F%2Flonghornio/longhorn-instance-manager_v1_20220303, result: SUCCESS
hopctl version
:
Output of hoppr/hopctl:1.8.4-rockylinux
Additional details (purl types in sboms, example manifest, and transfers.yml):
{
"type": "container",
"name": "longhorn-instance-manager",
"version": "v1_20220303",
"scope": "required",
"purl": "pkg:docker/longhornio/longhorn-instance-manager@v1_20220303"
},
Edited by Jerod Heck