dockerfile-maven icon indicating copy to clipboard operation
dockerfile-maven copied to clipboard

dockerHostUri didn't work

Open steven-dai opened this issue 5 years ago • 3 comments

I referred to this address my plugin info:

                        <plugin>
				<groupId>com.spotify</groupId>
				<artifactId>dockerfile-maven-plugin</artifactId>
				<version>1.4.13</version>
				<executions>
					<execution>
						<id>default</id>
						<goals>
							<goal>build</goal>
							<goal>push</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<dockerHostUri>http://39.101.163.100:2375</dockerHostUri>
					<!-- dockerfile文件路径 -->
					<contextDirectory>./</contextDirectory>
					<!-- 镜像地址 -->
					<repository>${docker.registry}/demo</repository>
					<!-- 不指定tag默认为latest -->
					<tag>${project.version}</tag>
					<!-- 构建参数,可以传递给Dockerfile -->
					<buildArgs>
						<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
					</buildArgs>
				</configuration>
			</plugin>

when I exec DOCKER_HOST=http://39.101.163.100:2375 mvn clean package , it's ok! when I exec mvn clean package ,it's error! 十月 29, 2020 5:08:51 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute 信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

I want to add 'DOCKER_HOST' in my pom.xml,What should I do?Thanks

steven-dai avatar Oct 29 '20 09:10 steven-dai

Did you get any answer for it? I was under impression that you cannot define DOCKER_HOST in POM.xml and used by env config of the docker client, but it would be cool if we could define it in pom.xml (LIke the spotify/docker-maven-plugin).

GauravBhandari19 avatar Nov 29 '20 18:11 GauravBhandari19

DOCKER_HOST=http://xxx.xxx.253.62:2375 mvn clean package dockerfile:build it's ok. export DOCKER_HOST=tcp://xxx.xxx.253.62:2375 mvn clean package dockerfile:build but it's fail, not pass on image to docker host, why?

zlcolin avatar Dec 19 '20 08:12 zlcolin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 04:01 stale[bot]