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

Support for container image addresses using digest and complex paths #115

Open
cardil opened this issue May 21, 2020 · 0 comments
Open

Support for container image addresses using digest and complex paths #115

cardil opened this issue May 21, 2020 · 0 comments

Comments

@cardil
Copy link

cardil commented May 21, 2020

if (image.contains(":")) {
String imageName = image.split(":")[0];
String imageVersion = image.split(":")[1];
return Optional.of(new ServiceLocator.Service(
imageName.contains("/") ? imageName.substring(imageName.lastIndexOf("/") + 1) : imageName,
imageVersion
));
} else {
return Optional.<ServiceLocator.Service>empty();
}

Images can, and should be specified using digest, rather than tags. Tags are mutable, so they aren't secure. Digests are immutable, and always point to the same image.

Full container path can look like: domain.org/dir-1/dir-n/name:tag@sha256:deadbeef

Below image names are valid and working:

  • quay.io/cardil/wathola-forwarder:v0.7.0@sha256:5130875b448f6d4a8d1d422e83358c8a56a21466cbd51492e7ff4d5ebddb7d26
  • quay.io/cardil/wathola-forwarder@sha256:5130875b448f6d4a8d1d422e83358c8a56a21466cbd51492e7ff4d5ebddb7d26
  • quay.io/cardil/wathola-forwarder:v0.7.0

Now Judge-d looks only for tagged images. It should properly parse image address.

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

No branches or pull requests

1 participant