使用来自 Bitbucket Pipelines 的 docker-maven-plugin 将图像推送到 DockerHub

问题描述

我正在尝试通过 docker-maven-plugin 设置 fabric8,以便我可以从 Bitbucket Pipelines 中使用它。

我的 pom.xml 看起来像这样:

..
..
<plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <configuration>
                            <dockerHost>???????????</dockerHost>
                            <verbose>true</verbose>
                            <pushRegistry>true</pushRegistry>
                            <authConfig>
                                <username>username</username>
                                <password>password</password>
                            </authConfig>
                            <images>
                                <image>
                                    <registry>registry.hub.docker.com</registry>
                                    <name>${dockerhub.repository}</name>
                                    <build>
                                        <dockerFileDir>${project.basedir}</dockerFileDir>
                                        <tags>
                                            <tag>${docker.tag}</tag>
                                        </tags>
                                        <noCache>true</noCache>
                                    </build>
                                </image>
                            </images>
                        </configuration>
                        <executions>
                        ...
                      </plugin>


这在本地运行时效果很好。 我在 Bitbucket Pipelines 上遇到的错误是:

[ERROR] DOCKER> Cannot create docker access object  [Connect to localhost:2375 [localhost/127.0.0.1,localhost/0:0:0:0:0:0:0:1] Failed: Connection refused (Connection refused)]

是的,这是因为我不确定在 <dockerHost> 标签中放什么,知道吗? 还有什么需要做才能远程完成这项工作吗?

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...