Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
The org.jclouds.docker.compute.strategy.DockerComputeServiceAdapter.getImage(String) method doesn't find images when Docker from RHEL (Atomic) is used. The reason is the returned Image repoTags field from the Docker server contains also registry hostname. E.g.
"RepoTags":["docker.io/kwart/alpine-ext:3.3-ssh"]
The problem is in the condition used in this piece of code:
for (String tag : input.repoTags()) { if (tag.equals(imageIdOrName) || tag.equals(imageIdOrName + ":latest")) { return true; } }
IMO, we should add also 2 more options to statement:
final String imageNameWithHostPrefix = "docker.io/" + imageIdOrName; for (String tag : input.repoTags()) { if (tag.equals(imageIdOrName) || tag.equals(imageIdOrName + ":latest") || tag.equals(imageNameWithHostPrefix) || tag.equals(imageNameWithHostPrefix + ":latest")) { ...