信息:处理{}的请求时捕获的I / O异常(java.io.IOException) - > unix:// localhost:80:权限被拒绝

时间:2017-01-12 18:07:25

标签: docker jhipster

尝试在Ubuntu上构建jhipster应用程序的Docker镜像时。得到错误:

INFO: Retrying request to {}->unix://localhost:80
Jan 12, 2017 11:45:49 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
Jan 12, 2017 11:45:49 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->unix://localhost:80
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:19 min
[INFO] Finished at: 2017-01-12T11:45:49-06:00
[INFO] Final Memory: 77M/730M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project poetry: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: Permission denied -> [Help 1]

3 个答案:

答案 0 :(得分:0)

为您的jhipster应用用户组添加docker权限 要么 尝试直接在/ etc / default / docker中添加DOCKER_OPTS =' - G'。然后通过sudo service docker restart

重启docker service

答案 1 :(得分:0)

将docker_host环境变量导出到终端

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

答案 2 :(得分:-1)

当docker从root用户运行并且你的mvn build命令在普通用户上运行时,我收到此错误。我尝试运行sudo wit mvn docker:build并且它获得了成功。