Docker permission denied while trying to connect to the Docker daemon socket
Problem
jenkins执行docker打包的时候报错,说没有权限
docker build -t docker.ryan-miao.com/com.demo:f1aa23e --build-arg SPRING_PROFILE=prod --build-arg JAR_FILE=target/demo-1.0-SNAPSHOT.jar .
docker: 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.26/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'
Solution
可以使用sudo
root权限执行,但我们还是想要用jenkins用户来做这件事。只要把jenkins添加到docker的group里就可以了。
sudo usermod -a -G docker jenkins
这时候,重新jenkins构建依旧是不行的。需要刷新session。所以,需要重启jenkins。
Docker permission denied while trying to connect to the Docker daemon socket的更多相关文章
- Solving Docker permission denied while trying to connect to the Docker daemon socket
The error message tells you that your current user can’t access the docker engine, because you’re la ...
- Got permission denied while trying to connect to the Docker daemon socket at
添加新用户后执行docker命令由于没权限出现以下报错: ”Got permission denied while trying to connect to the Docker daemon soc ...
- Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: conne
使用docker报如下错误信息: Got permission denied while trying to connect to the Docker daemon socket at unix:/ ...
- Got permission denied while trying to connect to the Docker daemon socket at unix
拉取Dockerimages时错误信息如下: [master@localhost ~]$ docker pull redis Using default tag: latest Got permiss ...
- docker Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post
利用docker构建时,报错 + docker pull maven:3-alpine Got permission denied while trying to connect to the Doc ...
- [问题解决]Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
写了一个脚本读取docker日志,发生报错:Got permission denied while trying to connect to the Docker daemon socket at u ...
- 启动docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
启动docker提示: docker: Got permission denied while trying to connect to the Docker daemon socket at uni ...
- 解决Docker运行命令时提示"Got permission denied while trying to connect to the Docker daemon socket"类情况
Docker安装命令: 解决Docker运行命令时提示"Got permission denied while trying to connect to the Docker daemon ...
- Docker Got permission denied while trying to connect to the Docker daemon socket at unix://
这是没有权限的原因,先将自己加入docker组,然后在重新启动就可以了, 下面参考来源:https://blog.csdn.net/weixin_40896352/article/details/80 ...
随机推荐
- 伪分布式hbase数据迁移汇总
https://www.jianshu.com/p/990bb550be3b hbase0.94.11(hadoop为1.1.2,此电脑ip为172.19.32.128)向hbase1.1.2 (ha ...
- HDU5470 Typewriter SAM 动态规划 单调队列
原文链接https://www.cnblogs.com/zhouzhendong/p/HDU5470.html 题目传送门 - HDU5470 题意 你需要写一个只包含小写字母的字符串 $s$ . 你 ...
- P1005 矩阵取数游戏 区间dp 高精度
题目描述 帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n \times mn×m的矩阵,矩阵中的每个元素a_{i,j}ai,j均为非负整数.游戏规则如下: 每次取数时须从每行各取走一个元素,共n ...
- LoadRunner服务水平协议SLA
服务水平协议 (或称 SLA)是以插入的事务为设置对象来为负载测试场景定义的具体目标. Analysis 将这些目标与 LoadRunner在运行过程中收集和存储的性能相关数据进行比较,然后确定目标的 ...
- MarkdownPad 2在win10上安装及破解(含安装包)
MarkdownPad 2 是一款较不错的Markdown编辑器,可快速将文本转换为美观的HTML/XHTML的网页格式代码,且操作方便,用户可以通过键盘快捷键和工具栏按钮来使用或者移除Markdow ...
- Pandas学习1 --- 数据载入
import numpy as np import pandas as pd 数据加载 首先,我们需要将收集的数据加载到内存中,才能进行进一步的操作.pandas提供了非常多的读取数据的函数,分别应用 ...
- ORA-01440 要减小精度或者标度.则要修改的列必须为空.
--1 创建备份表 drop table contract_kangjia_back; create table contract_kangjia_back as select * from cont ...
- [SNV]奇怪的错误搜集
ld: library not found for -XXXXX clang: error: linker command failed with exit code 1 (use -v to see ...
- LOJ.2718.[NOI2018]归程(Kruskal重构树 倍增)
LOJ2718 BZOJ5415 洛谷P4768 Rank3+Rank1无压力 BZOJ最初还不是一道权限题... Update 2019.1.5 UOJ上被hack了....好像是纯一条链的数据过不 ...
- 测试中,重现偶发的BUG问题。
1.严格按用例执行: 2.如果是作随机测试时,把测试步骤的点进行速记; 3.偶发BUG一般都是严重的,保留现场,让开发人员一起分析留下的现场(如数据的变化,界面窗口的变化等,找出问题的引子,那怕是千丝 ...