Skip to content
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

added support for defining prefixes as : in the fs #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dxlr8r
Copy link

@dxlr8r dxlr8r commented Dec 8, 2020

Great project. However, we need to be able to add support for prefixes without defining it for all repositories.

Now I can do:

$ skopeo copy --format v2s2 --dest-compress docker://docker.io/foo/bar:latest dir:images/foo:bar/latest

And I can pull it as normal:

$ docker pull myregistry/foo/bar:latest

@NicolasT
Copy link
Owner

I'm afraid I don't fully understand what this PR brings... Could you explain a bit more? Thank you!

@dxlr8r
Copy link
Author

dxlr8r commented Jan 6, 2021

When using helm charts, plain old regular yml files, etc. with Kubernetes, they have the prefix (if any) already defined. One definition might be:

image: aaa/xxx:v1.0.0

Another:

image: yyy:latest

So for using static-container-registry with Kubernetes resources, without manually altering all charts etc., one needs the possibility to define the prefix, or remove it, per image.

@NicolasT
Copy link
Owner

Ah, I think I get it now. In the project for which this tools was initially developed we have something similar, but there we keep all images that have a different prefix in other directories (could be subdirectories of your images/), then run this tool multiple times, once for each subdirectory, with the appropriate prefix. Finally, all resulting configs are included in the nginx config.

@dxlr8r
Copy link
Author

dxlr8r commented Jan 13, 2021

Ahhh, I see. Yes, that is possible as well. For us, that approach will require more steps to automate.

I do prefer the way suggested in the pull request, but I could your method work for us as well.

@NicolasT
Copy link
Owner

Fair enough :) Seems like a useful feature.

Could you add some tests to the suite to validate the changes? There may be a way to calculate the sname once instead of having multiple replace calls.

Looks like TravisCI isn't picking up the PR either, and DockerCloud tests is broken sigh. I'll need to look into that.

@dxlr8r
Copy link
Author

dxlr8r commented Jan 14, 2021

Could you add some tests to the suite to validate the changes? There may be a way to calculate the sname once instead of having multiple replace calls.

This is my first experience with Python, hardly coded a single line outside of "hello worlds". The "sname" was more a proof of concept, I do not know if that is the best name either.

I'll see what I can manage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants