Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Plugin fails when Docker for Mac is installed (OSX) #218

Closed
Rambrant opened this issue Apr 14, 2016 · 52 comments
Closed

Plugin fails when Docker for Mac is installed (OSX) #218

Rambrant opened this issue Apr 14, 2016 · 52 comments

Comments

@Rambrant
Copy link

Description

The plugin fails to build the container when I'm using "Docker for Mac". The plugin can't connect to the Docker daemon. (I suspect that the absence of DOCKER_HOST env variable could be the reason. The problem is that Docker for Mac stops working if i set it...)

How to reproduce

Run a maven build after installing Docker for Mac

What do you expect

I would expect the plugin to succeed :-)

What happened instead

The plugin could not connect to the daemon.

Software:

  • docker version: Docker for Mac Version 1.11.0-beta6 (build: 5404), Server Version: 1.11.0-rc3
  • docker-maven-plugin version:0.4.5
  • maven version: 3.2.3

Full backtrace

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.5:build (server) on project web-service: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.spotify:docker-maven-plugin:0.4.5:build (server) on project web-service: Exception caught
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.apache.maven.plugin.MojoExecutionException: Exception caught
    at com.spotify.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:115)
    at com.spotify.docker.BuildMojo.execute(BuildMojo.java:86)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 25 more
Caused by: com.spotify.docker.client.DockerException: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused
    at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:1405)
    at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:1346)
    at com.spotify.docker.client.DefaultDockerClient.version(DefaultDockerClient.java:343)
    at com.spotify.docker.client.DefaultDockerClient.authRegistryHeader(DefaultDockerClient.java:1444)
    at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:974)
    at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:933)
    at com.spotify.docker.BuildMojo.buildImage(BuildMojo.java:562)
    at com.spotify.docker.BuildMojo.execute(BuildMojo.java:347)
    at com.spotify.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:113)
    ... 28 more
Caused by: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused
    at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
    at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
    at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
    at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:1344)
    ... 35 more
Caused by: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused
    at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:481)
    at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
    at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37)
    at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487)
    at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:177)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
    at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:209)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
    ... 21 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    ... 30 more
@mattnworb
Copy link
Member

what happens to Docker for Mac when DOCKER_HOST is set?

@Rambrant
Copy link
Author

Hi

That was a fast respons!

When I set DOCKER HOST to localhost

DOCKER_HOST=tcp://127.0.0.1:2375
ThomasPro:~ thomas$ docker ps -a
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

When i set it with the name where Docker for Mac forwards the ports

ThomasPro:~ thomas$ export DOCKER_HOST=tcp://docker.local:2375
ThomasPro:~ thomas$ docker ps -a
An error occurred trying to connect: Get http://docker.local:2375/v1.23/containers/json?all=1: dial tcp: lookup docker.local on 172.20.10.1:53: no such host

But I can ping it

homasPro:~ thomas$ ping docker.local
PING docker.local (192.168.64.3): 56 data bytes
64 bytes from 192.168.64.3: icmp_seq=0 ttl=64 time=0.432 ms
64 bytes from 192.168.64.3: icmp_seq=1 ttl=64 time=0.546 ms
64 bytes from 192.168.64.3: icmp_seq=2 ttl=64 time=0.545 ms
64 bytes from 192.168.64.3: icmp_seq=3 ttl=64 time=0.430 ms
^C
--- docker.local ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.430/0.488/0.546/0.057 ms

I filed a ticket on Docker forums and the workaround is to set DOCKER_HOST to

ThomasPro:~ thomas$ export DOCKER_HOST=unix:///private/var/tmp/docker.sock
ThomasPro:~ thomas$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS

What value you should set on Windows? I have no clue…
As I said, I have filed a ticket and suggested that they forward the port 2375 to localhost but who knows how they want to solve this.

Docker for Mac doesn’t set DOCKER_HOST, nor should it so this is a temporary fix. I hope you can get it working without this

Best regards

/Thomas

On 14 apr. 2016, at 15:32, Matt Brown notifications@github.com wrote:

what happens to Docker for Mac when DOCKER_HOST is set?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #218 (comment)

@Rambrant
Copy link
Author

@jonnyshaw89
Copy link

+1 on this issue.
when i set my DOCKER_HOST to tcp://192.168.64.5:2375 i get the following error

Failed to execute goal com.spotify:docker-maven-plugin:0.4.5:build (default-cli) on project identify: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

@ghost
Copy link

ghost commented May 2, 2016

+1 too using plugin version 0.4.9, docker 1.10.3, virtualbox 5.0.20, maven 3.3.9, java 1.8.0_74 and os x 10.11.4.

The "docker-machine ls" command report URL "tcp://172.16.1.107:2376" so I exported DOCKER_HOST accordingly.

  1. I can successfully "docker-machine ssh default";
  2. I can "docker build", "docker tag" and "docker push" the project without problem;
  3. Running "mvn -X clean package docker:build" I got (almost the same Rambrant got, possibly different plugin version):
Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException
  .  .  .
Caused by: org.apache.maven.plugin.MojoExecutionException: Exception caught
    at com.spotify.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:129)
    at com.spotify.docker.BuildMojo.execute(BuildMojo.java:86)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

The plugin configuration is plain vanilla

            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>${docker.maven.plugin.version}</version>
                <configuration>
                    <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                    <dockerDirectory>src/main/docker</dockerDirectory>
                    <imageTags>
                        <imageTag>${project.version}</imageTag>
                        <imageTag>sp2</imageTag>
                    </imageTags>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>

There's something else I can help with?

@mattnworb
Copy link
Member

Sounds like it may be related to #183 (comment)

@ghost
Copy link

ghost commented May 3, 2016

So far I tried to change .docker folder without success and tried the deis solution do disable TLS, but doesn't work for me - the docker-machine can't work properly without TLS and I lack the knowledge to configure it to run without TLS by myself for now.

And by the way, my docker installation isn't remote - we use 172.16.0.0/12 to the virtualized hosts here. I tested using the regular 192.168.99.100 docker-machine just for sanity check and the problem persists.

For now the workaround I'm using is to put some shell commands into the build and release the project to the next phase and keep investigating this issue.

@ghost
Copy link

ghost commented May 3, 2016

Good news, at least for me;),

Please, refer to this.

Looking at my pom.xml the <artifactId> and at my Dockerfile the ADD, RUN and ENTRYPOINT had a invalid repository name value - only [a-z0-9-_.] are allowed!

Hope this help you guys!

@luizkowalski
Copy link

Having the same issue, using docker for mac beta9
I tried to set DOCKER_HOST to docker.sock and not set DOCKER_HOST at all, and both didn't worked.
Just to let you know and also to follow this thread

@wwsong
Copy link

wwsong commented May 3, 2016

Having the same issue as well. docker plugin in version 0.4.9. com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException Connection refused.
running on mac. set DOCKER_HOST won't help

@krystiannowak
Copy link

I was just testing the issue with the newest Docker Beta for Mac:

  • docker version: Docker for Mac Version 1.11.1-beta10 (build: 6662)
  • docker-maven-plugin version: 0.4.9 (also in old 0.3.258)
  • maven version: 3.3.9

and setting:
export DOCKER_HOST=unix:///var/run/docker.sock
just works.

@wwsong
Copy link

wwsong commented May 6, 2016

actually looks like if you just follow the docker-machine instruction
run this command "eval $(docker-machine env default)" to setup the shell correctly. Then it will work. You are supposed to run this every time the docker-machine starts or creates a virtual host.

@luizkowalski
Copy link

well, tried to use the 0.4.9 plugin version and still doesn't work.I mean, now I got stucked in the copy.

[INFO] --- docker-maven-plugin:0.4.9:build (default-cli) @ eureka-server ---
[INFO] Copying target/eureka-server-0.0.1-SNAPSHOT.jar -> eureka-server/target/docker/eureka-server-0.0.1-SNAPSHOT.jar

and thats it. the processor usage hits 300% and nothing happens

@wwsong
Copy link

wwsong commented May 6, 2016

if you are running in the IDE, you need to manually set those env variable in the maven build configuration.

@jdubois
Copy link

jdubois commented May 7, 2016

I confirm the export DOCKER_HOST=unix:///var/run/docker.sock solution from @krystiannowak works!

@luizkowalski
Copy link

On Sat, May 7, 2016 at 12:35 PM, Julien Dubois notifications@github.com
wrote:

I confirm the export DOCKER_HOST=unix:///var/run/docker.sock solution
from @krystiannowak https://github.com/krystiannowak works!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#218 (comment)

​I can also confirm that doesn't work :(​

@tigran10
Copy link

tigran10 commented May 7, 2016

yep as @krystiannowak said, adding export DOCKER_HOST=unix:///var/run/docker.sock works with Version 1.11.1-beta10 (build: 6662) ,

@techtabu
Copy link

techtabu commented May 9, 2016

@wwsong Your suggestion is correct when you are running Docker using Docker tool box in Mac, which create a VM and runs docker inside it. Docker-maven-plugin does not have the issue reported here. However, Docker has recently released a native app for Mac, which is an invitation only beta program. The problem reported here is for Docker for Mac beta only.

@luizkowalski
Copy link

any news on this?

@mattnworb
Copy link
Member

I can build an image using docker-maven-plugin 0.4.9 and Docker for Mac (Version 1.11.1-beta11 (build: 6974)) when I set DOCKER_HOST=unix:///var/run/docker.sock.

e.g.

$ DOCKER_HOST=unix:///var/run/docker.sock mvn package

@luizkowalski have you tried a newer version of DFM?

@luizkowalski
Copy link

luizkowalski commented May 17, 2016

@mattnworb I'm using DFM 1.11.1-beta11, and set DOCKER_HOST on .zshrc. I also tried as you did, set before running the command, and I got the same result: stuck on copy of jar

this is Java on activity monitor hahaha. kicking chrome's ass on memory eating
screen shot 2016-05-17 at 8 51 58 pm

I don't know if it helps, but here are my specs
OS X El Capitan 10.11.5

Maven:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.5", arch: "x86_64", family: "mac"

Java

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home

@mattnworb
Copy link
Member

@luizkowalski thanks for the additional info. Just to be clear, that java process in the Activity Monitor is maven? If so and it happens again, could you try to take a thread dump of the process and post it here?

Could you also mention what the full mvn command is that you are running and share what the plugin configuration in your pom.xml looks like, just for completeness?

@mattnworb
Copy link
Member

btw I am also using Maven 3.3.9 but JDK 1.8.0_71.

@luizkowalski
Copy link

Ok, here it goes:
Thread dump will kill -3

[INFO] Copying /Users/luizkowalski/java_dev/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar -> /Users/luizkowalski/java_dev/eureka-server/target/docker/eureka-server-0.0.1-SNAPSHOT.jar
2016-05-17 21:21:31
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.66-b17 mixed mode):

"Attach Listener" #10 daemon prio=9 os_prio=31 tid=0x00007fbd15360000 nid=0x350b runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #8 daemon prio=9 os_prio=31 tid=0x00007fbd11825000 nid=0x4803 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x00007fbd1106c000 nid=0x4603 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=31 tid=0x00007fbd1084b800 nid=0x4403 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=31 tid=0x00007fbd10849800 nid=0x4203 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=31 tid=0x00007fbd11084000 nid=0x360f waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007fbd1104b800 nid=0x3003 in Object.wait() [0x000070000092e000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000007804ecdc0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
    - locked <0x00000007804ecdc0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007fbd1104b000 nid=0x2e03 in Object.wait() [0x000070000082b000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000078045e7b8> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:502)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
    - locked <0x000000078045e7b8> (a java.lang.ref.Reference$Lock)

"main" #1 prio=5 os_prio=31 tid=0x00007fbd11002800 nid=0x1703 runnable [0x0000700000217000]
   java.lang.Thread.State: RUNNABLE
    at java.io.UnixFileSystem.list(Native Method)
    at java.io.File.list(File.java:1122)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:414)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:350)
    at com.spotify.docker.BuildMojo.copyResources(BuildMojo.java:723)
    at com.spotify.docker.BuildMojo.execute(BuildMojo.java:344)
    at com.spotify.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:127)
    at com.spotify.docker.BuildMojo.execute(BuildMojo.java:86)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

"VM Thread" os_prio=31 tid=0x00007fbd11048000 nid=0x2c03 runnable

"GC task thread#0 (ParallelGC)" os_prio=31 tid=0x00007fbd1080f800 nid=0x2403 runnable

"GC task thread#1 (ParallelGC)" os_prio=31 tid=0x00007fbd11004000 nid=0x2603 runnable

"GC task thread#2 (ParallelGC)" os_prio=31 tid=0x00007fbd1100d000 nid=0x2803 runnable

"GC task thread#3 (ParallelGC)" os_prio=31 tid=0x00007fbd1100d800 nid=0x2a03 runnable

"VM Periodic Task Thread" os_prio=31 tid=0x00007fbd11826000 nid=0x4a03 waiting on condition

JNI global references: 247

Heap
 PSYoungGen      total 235008K, used 83655K [0x00000007aab00000, 0x00000007bf380000, 0x00000007c0000000)
  eden space 131584K, 43% used [0x00000007aab00000,0x00000007ae389cd8,0x00000007b2b80000)
  from space 103424K, 24% used [0x00000007b8e80000,0x00000007ba7a8000,0x00000007bf380000)
  to   space 101376K, 0% used [0x00000007b2b80000,0x00000007b2b80000,0x00000007b8e80000)
 ParOldGen       total 517632K, used 484600K [0x0000000780000000, 0x000000079f980000, 0x00000007aab00000)
  object space 517632K, 93% used [0x0000000780000000,0x000000079d93e208,0x000000079f980000)
 Metaspace       used 31699K, capacity 32346K, committed 32512K, reserved 1077248K
  class space    used 3880K, capacity 4096K, committed 4096K, reserved 1048576K

full command:

DOCKER_HOST=unix:///var/run/docker.sock mvn clean package docker:build

pom.xml (the tag)

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <docker.image.prefix>luizkowalski</docker.image.prefix>
    </properties>
... more xml
<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.9</version>
                <configuration>
                    <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                    <dockerDirectory>/</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
        </plugins>
    </build>

and running with -X

[DEBUG]       com.googlecode.javaewah:JavaEWAH:jar:0.5.6:compile
[DEBUG]    com.fasterxml.jackson.core:jackson-databind:jar:2.2.3:compile
[DEBUG]       com.fasterxml.jackson.core:jackson-annotations:jar:2.2.3:compile
[DEBUG]       com.fasterxml.jackson.core:jackson-core:jar:2.2.3:compile
[DEBUG] Created new class realm plugin>com.spotify:docker-maven-plugin:0.4.9
[DEBUG] Importing foreign packages into class realm plugin>com.spotify:docker-maven-plugin:0.4.9
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>com.spotify:docker-maven-plugin:0.4.9
[DEBUG]   Included: com.spotify:docker-maven-plugin:jar:0.4.9
[DEBUG]   Included: com.spotify:docker-client:jar:shaded:4.0.2
[DEBUG]   Included: com.google.guava:guava:jar:18.0
[DEBUG]   Included: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.6.0
[DEBUG]   Included: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.6.0
[DEBUG]   Included: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.0
[DEBUG]   Included: com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.6.0
[DEBUG]   Included: org.glassfish.jersey.core:jersey-client:jar:2.19
[DEBUG]   Included: javax.ws.rs:javax.ws.rs-api:jar:2.0.1
[DEBUG]   Included: org.glassfish.jersey.core:jersey-common:jar:2.19
[DEBUG]   Included: javax.annotation:javax.annotation-api:jar:1.2
[DEBUG]   Included: org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.19
[DEBUG]   Included: org.glassfish.hk2:osgi-resource-locator:jar:1.0.1
[DEBUG]   Included: org.glassfish.hk2:hk2-api:jar:2.4.0-b25
[DEBUG]   Included: org.glassfish.hk2:hk2-utils:jar:2.4.0-b25
[DEBUG]   Included: org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b25
[DEBUG]   Included: org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25
[DEBUG]   Included: org.glassfish.hk2:hk2-locator:jar:2.4.0-b25
[DEBUG]   Included: org.javassist:javassist:jar:3.18.1-GA
[DEBUG]   Included: org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.19
[DEBUG]   Included: org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.19
[DEBUG]   Included: org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.19
[DEBUG]   Included: org.apache.commons:commons-compress:jar:1.9
[DEBUG]   Included: org.apache.httpcomponents:httpclient:jar:4.5
[DEBUG]   Included: org.apache.httpcomponents:httpcore:jar:4.4.1
[DEBUG]   Included: commons-logging:commons-logging:jar:1.2
[DEBUG]   Included: commons-codec:commons-codec:jar:1.9
[DEBUG]   Included: com.github.jnr:jnr-unixsocket:jar:0.8
[DEBUG]   Included: com.github.jnr:jnr-ffi:jar:2.0.3
[DEBUG]   Included: com.github.jnr:jffi:jar:1.2.9
[DEBUG]   Included: com.github.jnr:jffi:jar:native:1.2.9
[DEBUG]   Included: org.ow2.asm:asm:jar:5.0.3
[DEBUG]   Included: org.ow2.asm:asm-commons:jar:5.0.3
[DEBUG]   Included: org.ow2.asm:asm-analysis:jar:5.0.3
[DEBUG]   Included: org.ow2.asm:asm-tree:jar:5.0.3
[DEBUG]   Included: org.ow2.asm:asm-util:jar:5.0.3
[DEBUG]   Included: com.github.jnr:jnr-x86asm:jar:1.0.2
[DEBUG]   Included: com.github.jnr:jnr-constants:jar:0.8.7
[DEBUG]   Included: com.github.jnr:jnr-enxio:jar:0.9
[DEBUG]   Included: com.github.jnr:jnr-posix:jar:3.0.12
[DEBUG]   Included: commons-lang:commons-lang:jar:2.6
[DEBUG]   Included: org.bouncycastle:bcpkix-jdk15on:jar:1.52
[DEBUG]   Included: org.bouncycastle:bcprov-jdk15on:jar:1.52
[DEBUG]   Included: com.typesafe:config:jar:1.2.0
[DEBUG]   Included: org.apache.maven:maven-builder-support:jar:3.3.3
[DEBUG]   Included: org.eclipse.aether:aether-util:jar:1.0.2.v20150114
[DEBUG]   Included: javax.enterprise:cdi-api:jar:1.0
[DEBUG]   Included: javax.annotation:jsr250-api:jar:1.0
[DEBUG]   Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0
[DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:no_aop:3.2.5
[DEBUG]   Included: aopalliance:aopalliance:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.21
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.20
[DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.eclipse.jgit:org.eclipse.jgit:jar:3.2.0.201312181205-r
[DEBUG]   Included: com.jcraft:jsch:jar:0.1.46
[DEBUG]   Included: com.googlecode.javaewah:JavaEWAH:jar:0.5.6
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-databind:jar:2.2.3
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-annotations:jar:2.2.3
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-core:jar:2.2.3
[DEBUG] Configuring mojo com.spotify:docker-maven-plugin:0.4.9:build from plugin realm ClassRealm[plugin>com.spotify:docker-maven-plugin:0.4.9, parent: sun.misc.Launcher$AppClassLoader@33909752]
[DEBUG] Configuring mojo 'com.spotify:docker-maven-plugin:0.4.9:build' with basic configurator -->
[DEBUG]   (f) buildArgs = {}
[DEBUG]   (f) buildDirectory = /Users/luizkowalski/java_dev/eureka-server/target
[DEBUG]   (f) dockerDirectory = /
[DEBUG]   (f) env = {}
[DEBUG]   (f) exposes = []
[DEBUG]   (f) forceTags = false
[DEBUG]   (f) imageName = luizkowalski/eureka-server
[DEBUG]   (f) imageTags = []
[DEBUG]   (f) labels = []
[DEBUG]   (f) mavenProject = MavenProject: com.inkdrop:eureka-server:0.0.1-SNAPSHOT @ /Users/luizkowalski/java_dev/eureka-server/pom.xml
[DEBUG]   (f) noCache = false
[DEBUG]   (f) pullOnBuild = false
[DEBUG]   (f) pushImage = false
[DEBUG]   (f) pushImageTag = false
[DEBUG]   (s) targetPath = /
[DEBUG]   (s) directory = /Users/luizkowalski/java_dev/eureka-server/target
[DEBUG]   (s) include = eureka-server-0.0.1-SNAPSHOT.jar
[DEBUG]   (f) resources = [Resource {targetPath: /, filtering: false, FileSet {directory: /Users/luizkowalski/java_dev/eureka-server/target, PatternSet [includes: {eureka-server-0.0.1-SNAPSHOT.jar}, excludes: {}]}}]
[DEBUG]   (f) retryPushCount = 5
[DEBUG]   (f) retryPushTimeout = 10000
[DEBUG]   (f) runs = []
[DEBUG]   (f) skipDockerBuild = false
[DEBUG]   (f) squashRunCommands = false
[DEBUG]   (f) tagInfoFile = /Users/luizkowalski/java_dev/eureka-server/target/test-classes/image_info.json
[DEBUG]   (f) useGitCommitId = false
[DEBUG]   (f) volumes = []
[DEBUG]   (f) execution = com.spotify:docker-maven-plugin:0.4.9:build {execution: default-cli}
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@64d7b720
[DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@4d84049a
[DEBUG] -- end configuration --
[DEBUG] /Users/luizkowalski/.docker/ca.pem, /Users/luizkowalski/.docker/key.pem or /Users/luizkowalski/.docker/cert.pem does not exist, not using SSL
[DEBUG] Not using any build profile
[INFO] Copying /Users/luizkowalski/java_dev/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar -> /Users/luizkowalski/java_dev/eureka-server/target/docker/eureka-server-0.0.1-SNAPSHOT.jar

Again, stuck at Copying bla bla bla

@mattnworb
Copy link
Member

I think the problem is using / here:

 <dockerDirectory>/</dockerDirectory>

The plugin does not interpret this field as relative to the current working directory. So the directory scanner is probably trying to list every file on your disk:

    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:414)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:496)
    at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:350)
    at com.spotify.docker.BuildMojo.copyResources(BuildMojo.java:723)

Did you see this behavior before using Docker for Mac?

You may want <dockerDirectory>.</dockerDirectory> instead

@luizkowalski
Copy link

@mattnworb worked like a charm!

@luizkowalski
Copy link

luizkowalski commented May 17, 2016

but for some reason I cannot push

[INFO] Pushing luizkowalski/eureka-server
The push refers to a repository [docker.io/luizkowalski/eureka-server]
1703c3159c4e: Preparing
644b2833a9bd: Preparing
97bbfe1436d2: Preparing
5f70bf18a086: Preparing
82a47053c51a: Preparing
8f01a53880b9: Waiting
[WARNING] Failed to push luizkowalski/eureka-server, retrying in 10 seconds (5/5).
[INFO] Pushing luizkowalski/eureka-server
The push refers to a repository [docker.io/luizkowalski/eureka-server]
1703c3159c4e: Preparing
644b2833a9bd: Preparing
97bbfe1436d2: Preparing
5f70bf18a086: Preparing
82a47053c51a: Preparing
8f01a53880b9: Waiting

I just did mvn clean package docker:push -DpushImageTag=latest but I think this is not really related to the plugin

@mattnworb
Copy link
Member

I am going to close this issue then as it seems like the plugin works okay with Docker for Mac as long as DOCKER_HOST=unix:///var/run/docker.sock is set.

@luizkowalski can you create a new issue for your push problem? You may want to double-check that you are configuring the plugin correctly to push to your private registry.

@Rambrant
Copy link
Author

I think that closing this was a bit premature. I have followed this thread and was hoping that this could be solved without setting DOCKER_HOST.

Why can't the plugin default to this when DOCKER_HOST is missing? I think it's a bad idea to add things that is unnecessary:-)

Just my 20c

@mattnworb
Copy link
Member

Is unix:///var/run/docker.sock a safe default whenever the OS is osx? Currently the default used if no DOCKER_HOST is not set is localhost:2375, which will probably never work for this case.

@Rambrant
Copy link
Author

unix:///var/run/docker.sock is probably not a safe default... But can it be one of the candidates? first or second alternative... It seems Docker for MAC wont be helpful at all and publishing the 2375 port on localhost (or will it eventually)

@mattnworb
Copy link
Member

mattnworb commented May 19, 2016

spotify/docker-client#436 will default the DockerClient to using unix:///var/run/docker.sock on OS X. I made #229 to remember to upgrade and release this plugin.

@pjajara
Copy link

pjajara commented Oct 7, 2016

Confirming that below changes from @krystiannowak fixed my issue on OSX El Capitan, Version 1.12.1 (build: 12133). Thanks @krystiannowak, you da man!

export DOCKER_HOST=unix:///var/run/docker.sock

@krystiannowak
Copy link

@pjajara happy to hear that it works for you!

@aijs
Copy link

aijs commented Nov 22, 2016

when is use,there was no problem
com.spotify
docker-maven-plugin
0.4.13

@PatrickOsborne
Copy link

I've been trying to use the plugin, version 0.4.13, on Ubuntu with latest Docker (Docker version 17.03.1-ce, build c6d412e) with DOCKER_HOST set this way:

export DOCKER_HOST=unix:///var/run/docker.sock

and I get the following error:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project config: Exception caught: Request error: POST unix://localhost:80/build?t=petra/config: 500: HTTP 500 Internal Server Error -> [Help 1]

Any suggestions to resolve this??

@mattnworb
Copy link
Member

@PatrickOsborne have you seen the note in the readme about this?

@PatrickOsborne
Copy link

PatrickOsborne commented Apr 6, 2017

@mattnworb The image name follows the rules, but I am seeing this in the log, perhaps you can make some sense of it:

Apr 6 10:31:44 patrick-petra dockerd[973]: time="2017-04-06T10:31:44.811169831-06:00" level=error msg="Handler for POST /build returned error: Cannot locate specified Dockerfile: Dockerfile"

Dockerfile is located in project root.

plugin config:

       <plugin>
            <groupId>com.spotify</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>0.4.13</version>

            <configuration>
                <imageName>example</imageName>
                <dockerDirectory>docker</dockerDirectory>
                <resources>
                    <resource>
                        <targetPath>/</targetPath>
                        <directory>${project.build.directory}</directory>
                        <include>${project.build.finalName}.jar</include>
                    </resource>
                </resources>
            </configuration>

</plugin

@mattnworb
Copy link
Member

because you have specified <dockerDirectory>docker</dockerDirectory>, the plugin is sending the contents of the directory ${project.basedir}/docker as the docker build context, and that error message sounds like you do not have a Dockerfile in that directory.

@PatrickOsborne
Copy link

Thanks Matt! I changed docker directory to be maven build dir (target) and copied Dockerfile into that directory with resources plugin and everything is working now. Thanks for all the prompt help!!

@PatrickOsborne
Copy link

@mattnworb I have a quick question, when the plugin runs it creates a directory called docker in the build output dir (target) and then everything from target/ gets copies into it. Could you explain what is going on there? What is that for?

Thanks, Patrick

@ljnelson
Copy link

Hello; I'm having a similar issue. I am running Docker for Mac. There is no DOCKER_HOST environment variable set, nor do I want to set one. Instead, I am supplying the dockerHost user property to the plugin, and I have it set to unix:///var/run/docker.sock. I have walked the plugin source code and have noticed that it should be honored. And I can see in my Maven debug output that indeed it's being picked up (so it's not a Maven configuration issue):

[DEBUG] Configuring mojo 'com.spotify:docker-maven-plugin:0.4.13:build' with basic configurator -->
[snip]
[DEBUG]   (f) dockerHost = unix:///var/run/docker.sock

Nevertheless, I can also see in my Maven debug output that it is not being honored:

Caused by: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST unix://localhost:80/build?t=foobar: 500
	at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:1600)
	at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:1550)
	at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1145)
	at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1107)

There are no logs in my Docker daemon logs. How can I change that localhost:80 bit? Thanks!

@ljnelson
Copy link

The root issue is spotify/docker-client#479: briefly, no matter what you set as the dockerHost, when the client is built a "sanitizer" changes anything with unix: starting it to unix://localhost:80. I don't know why.

@mattnworb
Copy link
Member

see the comment here - the underlying connection is not actually to unix://localhost:80, it's just the url is misleading.

@ljnelson how have you checked the daemon's logs? a 500 error should definitely be that the Docker Remote API is returning an error

@ljnelson
Copy link

Thanks for your reply, @mattnworb. What's bizarre is that there are no daemon logs at all (from the timeframe we're talking about). So there's a 500, which implies someone is answering the phone :-D but I can't find any record anywhere of what the problem is.

Docker information in case it matters:
Version 17.03.1-ce-mac5 (16048)
Channel: stable
b18e2a50cc

docker ps works fine.

@ljnelson
Copy link

Sorry, I see you asked "how" I checked the logs. I've done syslog -k Sender Docker, and I've also looked in the Mac Console.

@ljnelson
Copy link

For posterity, and others on macOS: if you have a syntax error in your Dockerfile you will get a 500 Internal Server error when the docker-maven-plugin POSTs to the API but nothing will show up in the logs. I was missing a backslash.

@snowfenix
Copy link

@luizkowalski Did you solve your problem of not beeing able to push ?

@luizkowalski
Copy link

@princyraza I don't remember...I think I moved to a CI instead pushing on my own

@snowfenix
Copy link

@luizkowalski ok thanks. I am going to move mine to a CI too. However, I solved the push issue by adding my credentials in the global settings.xml

@alonsoir
Copy link

Not working for me.
I am using Docker Version 2.0.0.0-mac81 (29211).

$ mvn --version Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00) Maven home: /usr/local/Cellar/maven/3.6.0/libexec Java version: 1.8.0_172, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre Default locale: es_ES, platform encoding: UTF-8 OS name: "mac os x", version: "10.14.1", arch: "x86_64", family: "mac".

This is my pom.xml
and this is the output

@mattnworb
Copy link
Member

@alonsoir Docker does not allow image names with upper case characters, the daemon returns an error when you attempt to build an image with such a name which the plugin does not handle well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests