-
Notifications
You must be signed in to change notification settings - Fork 32
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
[BUG] support copying to registries with paths with hauler store copy
#241
Comments
Referenced again in Issue #232 |
Bumping, another customer hit this today, they are trying to push to artifactory sub-projects artifactory.domain.com/engineering/devops/images/carbide/ |
Bump as well, had a previous customer ran into the exact same issue. |
As mentioned here, since we are, effectively, expecting the copy target to be in URL/URI format, i.e. (Yes, the |
Everyone here is welcome to build my fork if they want in the meantime. It allows you to add |
Oh, my suggested solution already Just Works ™️: [ec2-user@c2s ~]$ hauler store --store=./store.test add image alpine:3.19
2024-06-10 19:06:40 INF adding 'image' [alpine:3.19] to the store
2024-06-10 19:06:44 INF successfully added 'image' [index.docker.io/library/alpine:3.19]
[ec2-user@c2s ~]$ hauler store --store=./store.test copy registry://harbor.ec2.internal/dweomer
2024-06-10 19:06:53 INF library/alpine:3.19
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:05455a08881ea9cf0e752bc48e61bbd71a34c029bb13df01e40e3e70e0d007bd
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:30c69795e46bd167df7f6152056f3c885cba4f5b4238e2327c73fb35c226d351
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:bca4290a96390d7a6fc6f2f9929370d06f8dfcacba591c76e3d5c5044e7f420c
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:ace17d5d883e9ea5a21138d0608d60aa2376c68f616c55b0b7e73fba6d8556a3
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:935b61847fc465ff70ecbd3436253a7596a500e649a16014646a99393ccbb661
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:fda0ff469afd28d9cfbb946e8e0a3c911c591a2691bea62be9187e45a1c50549
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 pushed blob: sha256:0dc2e6c0f9ded2daeca96bbf270526d182d2f4267f5c7610c222c05cad6f6b96
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 harbor.ec2.internal/dweomer/library/alpine@sha256:a0264d60f80df12bc1e6dd98bae6c43debe6667c0ba482711f0d806493467a46: digest: sha256:a0264d60f80df12bc1e6dd98bae6c43debe6667c0ba482711f0d806493467a46 size: 528
2024-06-10 19:06:54 INF 2024/06/10 19:06:54 harbor.ec2.internal/dweomer/library/alpine@sha256:ec299a7ba3c670e38642b0b62a0c779d84b249a3c889757e2b6f841433b4c6fe: digest: sha256:ec299a7ba3c670e38642b0b62a0c779d84b249a3c889757e2b6f841433b4c6fe size: 528
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 harbor.ec2.internal/dweomer/library/alpine@sha256:b229a85166aadbde58e73e03c5e2b9737fb4642ffb2d98ba453adc90d144c1d8: digest: sha256:b229a85166aadbde58e73e03c5e2b9737fb4642ffb2d98ba453adc90d144c1d8 size: 528
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 pushed blob: sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 pushed blob: sha256:4a0759b5afbffdc507fbb4e32b3a139063c3a5c0829f811973850447f98830ae
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 pushed blob: sha256:2d433224a9f8f46c545c8fc4bc82ea382227d892e9f0c704d90ef585542bf497
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 pushed blob: sha256:5b984dd0323cee557fb6a9d8796f4b4414317cf1fb88bb2047d2046ac9447d77
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 pushed blob: sha256:f4968021da4ff8b74325e5aebf0f9448b44becfdd14df80ecba474e43cc92546
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 harbor.ec2.internal/dweomer/library/alpine@sha256:6457d53fb065d6f250e1504b9bc42d5b6c65941d57532c072d929dd0628977d0: digest: sha256:6457d53fb065d6f250e1504b9bc42d5b6c65941d57532c072d929dd0628977d0 size: 528
2024-06-10 19:06:55 INF 2024/06/10 19:06:55 harbor.ec2.internal/dweomer/library/alpine@sha256:15c46ced65c6abed6a27472a7904b04273e9a8091a5627badd6ff016ab073171: digest: sha256:15c46ced65c6abed6a27472a7904b04273e9a8091a5627badd6ff016ab073171 size: 528
2024-06-10 19:06:56 INF 2024/06/10 19:06:56 harbor.ec2.internal/dweomer/library/alpine@sha256:b12b826de1ec8c4237aa09a0287e7be8bd317586f32bf6cd9395ec5dba52a3a2: digest: sha256:b12b826de1ec8c4237aa09a0287e7be8bd317586f32bf6cd9395ec5dba52a3a2 size: 528
2024-06-10 19:06:56 INF 2024/06/10 19:06:56 pushed blob: sha256:eb8fba61d86413beda3240c40c599041e040e658cd8314e38ee15e67ea57d349
2024-06-10 19:06:56 INF 2024/06/10 19:06:56 pushed blob: sha256:8fc740d8c40e45ea330a3f324fe009148dfc1f771bc90254eaf8ff8bbcecfe02
2024-06-10 19:06:56 INF 2024/06/10 19:06:56 harbor.ec2.internal/dweomer/library/alpine@sha256:5d0da60400afb021f2d8dbfec8b7d26457e77eb8825cba90eba84319133f0efe: digest: sha256:5d0da60400afb021f2d8dbfec8b7d26457e77eb8825cba90eba84319133f0efe size: 528
2024-06-10 19:06:56 INF 2024/06/10 19:06:56 harbor.ec2.internal/dweomer/library/alpine:3.19: digest: sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b size: 1638
2024-06-10 19:06:56 INF copied artifacts to [harbor.ec2.internal/dweomer]
[ec2-user@c2s ~]$ |
@dweomer That still does not work for a registry like Artifactory due to the login step. Artifactory is a special case where you must login to the root (artifactory.example.com) but push to the path (artifactory.example.com/repository). |
I haven't worked with a private Artifactory. Can you show me the failure(s) you get running my PoC script above, assuming that you've already logged in at the root? hauler login artifactory.example.com #implies https://artifactory.example.com/v2, whereas
hauler login artifactory.example.com/repository #implies https://artifactory.example.com/repository/v2 NM, don't try that part. I forget that we are using Crane and it's login does check for RFC 3986 authority compliance (whereas
|
Strangely enough, I am having trouble reproducing. I will work on it. |
Hey @ngearhart, have you had any more luck trying to reproduce this issue? any new information? |
@zackbradys I have not, sorry. I'm a bit swamped with other priorities at work right now, but will check in on this as soon as I can. |
Came here for this feature request. Very common to mirror internet registries inside internal registries with a subdirectory requirement of some sort but keeping all other paths identical. It would simplify if i had the option to add a flag like --prepend-path=$DEST_REPO_PREFIX of some kind.
It's also helpful when using registries that require the extra step to create the repo before pushing like ECR or Harbor. While possible to overcome in other ways, it's fixed in many environments by simply creating global projects. |
This doesn't seem to work when doing a 'store copy' using
|
I can confirm that
Does work for my use case. Therefore I am comfortable closing this, but want others to make the call if they feel it's still needed in some other way. |
Glad to hear it and thank you for reporting back your results! @ngearhart |
I don't think this is ready to be closed. We have a 'workaround', not a fix. We should either document this officially in our docs or 'fix' it properly |
This is not closed, as @HoustonDad said it is a workaround.... If you try with a proxy like Nexus OSS, where you don't have the fancy namespace/path prefix for proxying. Having a rewrite or something is very nice. |
Hey @HoustonDad / @a1994sc, this issue was regarding problems with hauler login registry.example.com -u bob -p haulin
hauler store copy registry://registry.example.com If you're referencing the ability to rewrite (and/or persist upstream registry information)... that is tracked in Issue #232! |
I'm referencing this: #241 (comment) Our docs advise to use '--username and --password' when doing a store copy. So either our docs need an update, or we need to fix this issue |
hauler store copy
hauler store copy
hauler store copy
Is this RFE related to an Existing Problem? If so, please describe: This is related to #232 as the implementation for this feature could solve both.
The goal would be for hauler to support copying to "path-required" registries.
Describe Proposed Solution(s):
--prepend-path
feature tohauler store copy
likehauler store copy --prepend-path registry-name registry://artifactory.example.com
such that hauler would prepend that path to all image tags.Describe Possible Alternatives:
such that
hauler store sync
pullsregistry1.dso.mil/ironbank/big-bang/argocd:v2.9.4
but saves it asregistry-name/ironbank/big-bang/argocd:v2.9.4
in the store.The text was updated successfully, but these errors were encountered: