EN
Docker + maven build problem - unix://localhost:80: Permission denied - com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: Permission denied
2 points
I try to build my microservice (java + docker) from jenkins level.
I setup the build and got an exception (console output from jenkins level):
xxxxxxxxxx
1
Dec 2, 2020 9:09:39 AM com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute
2
INFO: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
3
4
org.apache.maven.plugin.MojoExecutionException: Could not build image
5
at com.spotify.plugin.dockerfile.BuildMojo.buildImage(BuildMojo.java:208)
6
at com.spotify.plugin.dockerfile.BuildMojo.execute(BuildMojo.java:110)
7
8
Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: Permission denied
Run below command from root:
xxxxxxxxxx
1
chmod 666 /var/run/docker.sock
It will allow jenkins and other users to have permission to Docker socket file.