[英]docker - build fails when COPYing file to root
I'm getting a docker build error when I try to add a shell script to the root directory (/entrypoint.sh) 当我尝试将shell脚本添加到根目录(/entrypoint.sh)时,我收到了一个docker build错误
Dockerfile: Dockerfile:
FROM ubuntu:trusty
COPY ./entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
Output: 输出:
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM ubuntu:trusty
---> 1e0c3dd64ccd
Step 2 : COPY ./entrypoint.sh /
stat /var/lib/docker/aufs/mnt/5570570a77deddea426b95bd0f706beff4b5195a2fba4a8f70dcac4671bca225/entrypoint.sh: no such file or directory
The file is present at the root of the build context, and when I change / to a subdirectory such as /opt/, it works. 该文件存在于构建上下文的根目录中,当我更改/到/ opt /等子目录时,它可以正常工作。 Any idea what could be going wrong?
什么可能出错?
It turns out restarting the daemon solves the issue. 事实证明,重启守护进程可以解决问题。 See https://github.com/docker/docker/issues/25925 .
请参阅https://github.com/docker/docker/issues/25925 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.