jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1158) DockerComputeServiceAdapter.getImage(String) doesn't work correctly for Docker on RHEL Atomic host
Date Mon, 29 Aug 2016 20:40:20 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446992#comment-15446992
] 

ASF subversion and git services commented on JCLOUDS-1158:
----------------------------------------------------------

Commit 44946467a1c79239dc3e1aa949de01617027b2bb in jclouds-labs's branch refs/heads/master
from [~kwart]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;h=4494646 ]

JCLOUDS-1158 fix Docker find image Predicate for cases where repoTags field contains 'docker.io/'
registry host prefix


> DockerComputeServiceAdapter.getImage(String) doesn't work correctly for Docker on RHEL
Atomic host
> --------------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1158
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1158
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs
>            Reporter: Josef Cacek
>              Labels: docker
>
> 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.
> {code}
> "RepoTags":["docker.io/kwart/alpine-ext:3.3-ssh"]
> {code}
> The problem is in the condition used in this piece of code:
> {code}
> for (String tag : input.repoTags()) {
>    if (tag.equals(imageIdOrName) || tag.equals(imageIdOrName + ":latest")) {
>       return true;
>    }
> }
> {code}
> IMO, we should add also 2 more options to statement:
> {code}
> 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")) {
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message