docker 报错 error checking context: ‘no permission to read from ‘/home/velscode/.bash_history‘‘

错误现象

执行docker build时报错

velscode@velscode:~$ docker build -f Dockerfile . -t ubuntu/test:1.0
error checking context: 'no permission to read from '/home/velscode/.bash_history''.

错误原因

docker在build时会尝试对整个目录进行tar压缩,包括.开头的文件。我在主目录~进行build操作,而目录下的.bash_history没有执行权限,因此报错

解决方法

~下新建一个空目录,在这个目录里执行即可

nonobody@nonobody-Legion-R7000-ARP8:~/catkin_ws$ source devel/setup.bash nonobody@nonobody-Legion-R7000-ARP8:~/catkin_ws$ roslaunch grid_path_searcher demo.launch ... logging to /home/nonobody/.ros/log/fc9f499a-81b6-11f0-9e67-337946b96f37/roslaunch-nonobody-Legion-R7000-ARP8-4628.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://nonobody-Legion-R7000-ARP8:45899/ SUMMARY ======== PARAMETERS * /demo_node/map/margin: 0.0 * /demo_node/map/resolution: 0.2 * /demo_node/map/x_size: 20.0 * /demo_node/map/y_size: 20.0 * /demo_node/map/z_size: 10.0 * /demo_node/planning/start_x: 0.0 * /demo_node/planning/start_y: 0.0 * /demo_node/planning/start_z: 1.0 * /random_complex/CircleShape/lower_circle_rad: 0.6 * /random_complex/CircleShape/upper_circle_rad: 2.0 * /random_complex/ObstacleShape/lower_hei: 1.0 * /random_complex/ObstacleShape/lower_rad: 0.1 * /random_complex/ObstacleShape/upper_hei: 3.0 * /random_complex/ObstacleShape/upper_rad: 0.7 * /random_complex/init_state_x: 0.0 * /random_complex/init_state_y: 0.0 * /random_complex/map/circle_num: 40 * /random_complex/map/obs_num: 300 * /random_complex/map/resolution: 0.1 * /random_complex/map/x_size: 20.0 * /random_complex/map/y_size: 20.0 * /random_complex/map/z_size: 10.0 * /random_complex/sensing/rate: 0.5 * /rosdistro: noetic * /rosversion: 1.17.4 * /waypoint_generator/waypoint_type: manual-lonely-way... NODES / demo_node (grid_path_searcher/demo_node) random_complex (grid_path_searcher/random_complex) waypoint_generator (waypoint_generator/waypoint_generator) ROS_MASTER_URI=http://localhost:11311 ERROR: cannot launch node of type [grid_path_searcher/demo_node]: Cannot locate node of type [demo_node] in package [grid_path_searcher]. Make sure file exists in package path and permission is set to executable (chmod +x) ERROR: cannot launch node of type [grid_path_searcher/random_complex]: Cannot locate node of type [random_complex] in package [grid_path_searcher]. Make sure file exists in package path and permission is set to executable (chmod +x) process[waypoint_generator-3]: started with pid [4642] roslaunch grid_path_searcher demo.launch
08-26
Started by user wangyanan Running as SYSTEM Building in workspace /var/lib/jenkins/workspace/wyn-tomcat The recommended git tool is: NONE using credential f2d4bc93-a0cb-47be-9179-43abb24c18bf > git rev-parse --resolve-git-dir /var/lib/jenkins/workspace/wyn-tomcat/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url http://192.168.200.20:3000/wyn/wyn.git # timeout=10 Fetching upstream changes from http://192.168.200.20:3000/wyn/wyn.git > git --version # timeout=10 > git --version # 'git version 2.18.1' using GIT_ASKPASS to set credentials > git fetch --tags --progress -- http://192.168.200.20:3000/wyn/wyn.git +refs/heads/*:refs/remotes/origin/* # timeout=10 Seen branch in repository origin/master Seen 1 remote branch > git show-ref --tags -d # timeout=10 Checking out Revision bb82c0c7268211c47ac8286190bfb535e0b5d80f (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f bb82c0c7268211c47ac8286190bfb535e0b5d80f # timeout=10 Commit message: "first wyn commit" > git rev-list --no-walk bb82c0c7268211c47ac8286190bfb535e0b5d80f # timeout=10 [wyn-tomcat] $ /bin/sh -xe /tmp/jenkins9892240535786796116.sh + docker rm -f tomcat01 permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Delete "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/containers/tomcat01?force=1": dial unix /var/run/docker.sock: connect: permission denied Build step 'Execute shell' marked build as failure Finished: FAILURE
06-10
Started by user huzng Running as SYSTEM Building in workspace /var/jenkins_home/workspace/dcloud-short-link-account The recommended git tool is: NONE using credential 1f0bf418-ebd2-4381-9ec9-090e12e122ea > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/dcloud-short-link-account/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://gitee.com/huzng0816/dcloud-short-link.git # timeout=10 Fetching upstream changes from https://gitee.com/huzng0816/dcloud-short-link.git > git --version # timeout=10 > git --version # 'git version 2.39.5' using GIT_ASKPASS to set credentials gitee凭证 > git fetch --tags --force --progress -- https://gitee.com/huzng0816/dcloud-short-link.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 Checking out Revision 06a132ebd53b4aedcf207fa67ef4431ebb9dda4e (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 06a132ebd53b4aedcf207fa67ef4431ebb9dda4e # timeout=10 Commit message: "打包配置" First time build. Skipping changelog. [dcloud-short-link-account] $ /bin/sh -xe /tmp/jenkins3295438651166041262.sh + echo 登录阿里云镜像 登录阿里云镜像 + docker login login --username=huzng crpi-cgofe8pfpyt8kzhw.cn-shenzhen.personal.cr.aliyuncs.com --password=Hzh728675. /tmp/jenkins3295438651166041262.sh: 3: docker: Permission denied Build step 'Execute shell' marked build as failure Finished: FAILURE
最新发布
09-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值