![](/img/trans.png)
[英]Using docker image of maven with jenkins - could not create local repository
[英]I am learning DevOps basic steps and my task was create CICD Pipeline using jenkins and Docker on Maven Project From Repository
错误它向我显示 docker daemon 可能没有运行的错误
[INFO] ------------------------------------------------------------------------
[CICD-Maven-Jenkins-Docker-Integration] $ docker build -t imdhruv28/cicd-docker-jenkins-integration --pull=true /var/lib/jenkins/workspace/CICD-Maven-Jenkins-Docker-Integration
time="2020-03-24T14:27:15+05:30" level=error msg="failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: permission denied"
error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&pull=1&rm=1&session=3maudqn4r7n8md6azfdxz34vb&shmsize=0&t=imdhruv28%2Fcicd-docker-jenkins-integration&target=&ulimits=null&version=1: context canceled
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE
文件
FROM openjdk:8
EXPOSE 8081
ADD target/CICD-Docker-Jenkins-Integration.jar CICD-Docker-Jenkins-Integration.jar
ENTRYPOINT ["java", "-jar", "/CICD-Docker-Jenkins-Integration.jar"]
can any one will help me to solve this?
这里有两种可能的选择:
docker
组调试算法是首先手动检查 Docker 是否实际运行,然后验证 Jenkins 使用哪个用户来执行管道(将whoami
添加到管道以打印),最后确保该用户已添加到docker
组。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.