added support for defining prefixes as : in the fs
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
I'm afraid I don't fully understand what this PR brings... Could you explain a bit more? Thank you!
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.
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.
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.
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.
Could you add some tests to the suite to validate the changes? There may be a way to calculate the
snameonce instead of having multiplereplacecalls.
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.