docker build提示error checking context:can't stat xxx

现象描述

使用docker build一个镜像的时候,提示下面的错误:

➜ docker build -t image_name -f xxx.dockerfile .
error checking context: 'can't stat '/Users/wang/Workspace/db/.gitkeep''.

原因

权限问题造成的,即db这个文件夹,当前build用户是无权操作的。

解决方式

改成777…或者修改owner就好

猜你喜欢

转载自www.cnblogs.com/wswang/p/11692290.html