docker build 出现can't add file to archive:tar,missed writing 的报错

最近需要使用docker desktop这个软件来发布一些镜像(image)和容器(container),使用的是Windows系统,开启了虚拟机,并适配了平台。前面都调通了,却在docker build过程出现了大量 can't add file to archive:tar ... missed writing 72 bytes 的报错。我觉得这也许是文件权限导致的问题?

如下为使用Windows系统的powershell软件或者cmd指令运行的build语句

docker build -t mediapipe_unity:windows . -f docker/windows/x86_64/Dockerfile

这里是我使用的dockerfile文件及路径:

img


放在Windows/system32目录下面的原因是用powershell运行docker build命令时,小数点 “ . ” 默认的上下文路径就是system32

刚运行时的状态:

img

出错后的状态:

img

尝试过到Windows/system32文件夹、program data/docker文件夹、hyper-v以及所有可能涉及到image发布的文件夹里开放读写权限,但都失败了。

希望可以不吝赐教,能够让镜像文件成功发布。

你直接去你的Docker目录,使用docker build -t mediapipe_unity:windows .试试