当我尝试将shell脚本添加到根目录(/entrypoint.sh)时,我收到了一个docker build错误
Dockerfile:
FROM ubuntu:trusty
COPY ./entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
输出:
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
该文件存在于构建上下文的根目录中,当我更改/到/ opt /等子目录时,它可以正常工作 . 什么可能出错?
1 回答
事实证明,重启守护进程可以解决问题 . 见https://github.com/docker/docker/issues/25925 .