infra-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivér Szabó (JIRA) <j...@apache.org>
Subject [jira] [Commented] (INFRA-17071) Build and publish Docker images (infra-solr,logsearch) to Docker hub
Date Sun, 30 Sep 2018 18:03:00 GMT

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

Olivér Szabó commented on INFRA-17071:
--------------------------------------

[~gmcdonald], it seems i could not make this working, i have tried with different ways:

1.) simple docker build then calling docker push from command line:
got denied: requested access to the resource is denied. note that i can pull images.

I have seen the following in docker info output: (username can be interesting)
Username: asfbookkeeper
Registry: https://index.docker.io/v1/

2.) another option was to use maven docker plugin (fabric), i have created a really simple
one to try out, is the publish working:
{code:java}
 <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>0.27.1</version>
            <configuration>
              <images>
                <image>
                  <name>apache/ambari-infra-solr:latest</name>
                  <build>
                    <from>openjdk:10-jdk</from>
                  </build>
                </image>
              </images>
            </configuration>
          </plugin>
{code}
using that way, the pull itself is failed for openjdk:10-jdk, but i could pass that if i ran
that before the maven docker:build and docker:push (as it worked at option 1., that is expected),
then i got the following during the build:
{code:java}
3567 [INFO] DOCKER> [apache/ambari-infra-solr:latest]: Created docker-build.tar in 42 milliseconds
3683 [INFO] DOCKER> [apache/ambari-infra-solr:latest]: Built image sha256:82f76
3684 [INFO] 
3684 [INFO] --- docker-maven-plugin:0.27.1:push (default-cli) @ ambari-infra-assembly ---

3703 [INFO] DOCKER> The push refers to a repository [docker.io/apache/ambari-infra-solr]
#
4640 [ERROR] DOCKER> Unable to push 'apache/ambari-infra-solr:latest' : unauthorized: incorrect
username or password  [unauthorized: incorrect username or password ]
4641 [INFO] ------------------------------------------------------------------------
4641 [INFO] BUILD FAILURE
4642 [INFO] ------------------------------------------------------------------------
4642 [INFO] Total time: 3.393 s
4642 [INFO] Finished at: 2018-09-30T17:37:00Z
4643 [INFO] ------------------------------------------------------------------------
4644 [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.27.1:push (default-cli)
on project ambari-infra-assembly: Unable to push 'apache/ambari-infra-solr:latest' : unauthorized:
incorrect username or password -> [Help 1]
{code}

> Build and publish Docker images (infra-solr,logsearch) to Docker hub
> --------------------------------------------------------------------
>
>                 Key: INFRA-17071
>                 URL: https://issues.apache.org/jira/browse/INFRA-17071
>             Project: Infrastructure
>          Issue Type: Task
>          Components: Docker, Jenkins
>            Reporter: Olivér Szabó
>            Assignee: Gavin
>            Priority: Major
>              Labels: Docker
>
> For some newly created ambari repos (apache/ambari-logsearch and apache/ambari-infa)
we want to push containers to apache docker hub repos. 
> ask is similar as here: https://issues.apache.org/jira/browse/INFRA-16647
> images would be:
> apache/ambari-infra-solr
> apache/ambari-logsearch-portal
> apache/ambari-logsearch-logfeeder
> i have started to test around to see am i able to push (without an existing docker repo
on docker hub) directly to apache dockerhub with the jenkins user (https://builds.apache.org/job/Ambari-Infra-docker-push/
- it failed as it was expected)
> cc [~gmcdonald], 
> can those repositories be created on docker hub? and if jenkins user can access write
into those repos, is it needed to build and push the images through maven (as credentials
are in .m2/settings.xml or security.xml or something) or can we just call docker push with
the right params after the docker build?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message