复制失败:stat/var/lib/docker/tmp/docker-builder076499369/files/nginx.conf:没有这样的文件或目录 [英] COPY failed: stat /var/lib/docker/tmp/docker-builder076499369/files/nginx.conf: no such file or directory
问题描述
我正在运行以下版本的 docker ce
I am running following version of docker ce
Server: Docker Engine - Community
Engine:
Version: 18.09.5
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: e8ff056dbc
Built: Thu Apr 11 04:50:00 2019
OS/Arch: linux/amd64
Experimental: false
构建图像时出现以下错误
Getting following error while building image
删除中间容器 40e7e0172f54---> 5f2b3358b638 步骤 5/10:复制文件/nginx.conf/etc/nginx/nginx.conf 复制失败:stat/var/lib/docker/tmp/docker-builder076499369/files/nginx.conf:没有文件或目录
Removing intermediate container 40e7e0172f54 ---> 5f2b3358b638 Step 5/10 : COPY files/nginx.conf /etc/nginx/nginx.conf COPY failed: stat /var/lib/docker/tmp/docker-builder076499369/files/nginx.conf: no such file or directory
重新安装 docker.设置上下文.
Re-installing docker. Setting up context.
推荐答案
检查您是否具有以下文件结构:
Check that you have the following files structure:
|-- project
| |-- Dockerfile
| |-- files
| | |-- nginx.conf
还要确保 Dockerfile 旁边没有文件.dockerignore",如果有,请确保它不包含files"或nginx.conf"条目.
Also make sure that next to the Dockerfile you do not have a file ".dockerignore" and if you have one make sure it does not contain an entry for "files" or "nginx.conf".
那么它应该可以工作了.
Then it should work.
这篇关于复制失败:stat/var/lib/docker/tmp/docker-builder076499369/files/nginx.conf:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!