Jenkins中構建(Build)Docker映象時出現permission denied
問題描述
Jenkins中構建(Build)Docker映象時出現permission denied,jenkins日誌如下
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/build?buildargs=%7B%22envType%22%3A%22--spring.profiles.active%3Dtest%22%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=swzfw4zq2xwq9bmwlzuibujcj&shmsize=0&t=172.18.207.211%3A5000%2Fzxcx%2Fbff-admin-service%3A1.0.1.13-test&target=&ulimits=null&version=1: dial unix /var/run/docker.sock: connect: permission denied
time="2020-10-10T13:59:03+08:00" level=error msg="Can't close tar writer: io: read/write on closed pipe"
Build step 'Execute shell' marked build as failure
Finished: FAILURE
問題分析
通過Jenkins日誌我們可以看到訪問這個目錄時/var/run/docker.sock:
出現許可權錯誤
解決方案
把這個目錄的許可權開啟
chmod -R 777 /var/run/docker.sock
相關文章
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- git push出現Permission denied (publickey)錯誤Git
- docker構建映象Docker
- 【踩坑筆記】專案出現Permission denied筆記
- git出現Permission denied的解決辦法Git
- Android adb除錯出現:opendir failed, Permission deniedAndroid除錯AI
- Jenkins 構建自動化 .NET Core 釋出映象Jenkins
- unix /var/run/docker.sock: connect: permission deniedDocker
- docker構建supervisor映象Docker
- Docker 構建 kubectl 映象Docker
- Docker映象構建(五)Docker
- Docker映象構建原理解析(不裝docker也能構建映象)Docker
- 解決方案 git@github.com出現Permission denied (publickey)Github
- PHP中 mkdir: Permission denied 問題PHP
- docker 構建自己的映象Docker
- Docker 映象構建之 DockerfileDocker
- Jenkins定時構建Jenkins
- Docker 構建多平臺映象Docker
- Docker構建多平臺映象Docker
- Docker 構建PHP 映象環境DockerPHP
- Docker 映象分階段構建Docker
- Docker 分階段構建映象Docker
- Docker容器掛載資料卷出現Permission denied許可權問題的解決辦法Docker
- CentOS7.4中Docker以rw方式掛載volume報Permission denied問題CentOSDocker
- 不用安裝docker也能構建docker映象Docker
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- Nginx: stat() failed (13: permission denied)NginxAI
- Angular macOS Err:EACCES: permission deniedAngularMac
- jenkins 釋出映象清理Jenkins
- docker映象構建libreoffice轉換檔案Docker
- 構建 Docker 映象的 N 個小技巧Docker
- jenkins構建後操作post build tasks外掛的使用說明JenkinsUI
- nginx部署(13:Permission denied)報錯Nginx
- Error: Permission denied @ apply2filesErrorAPP
- Android Studio: /dev/kvm device permission deniedAndroiddev
- Jenkins把GitHub專案做成Docker映象JenkinsGithubDocker
- SpringBoot 構建 Docker 映象的最佳 3 種方式Spring BootDocker