moby: Docker build cannot COPY the file to `/` directory
Dear all,
I’m running docker inside an ubuntu (16.04) VM (vmware player), here is my docker version
Client:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 22:11:10 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 22:11:10 2016
OS/Arch: linux/amd64
the output of docker info
Containers: 11
Running: 1
Paused: 0
Stopped: 10
Images: 161
Server Version: 1.12.0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 85
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-34-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.66 GiB
Name: ubuntu
ID: NAWG:CZGX:MIW2:B6XJ:FBKQ:5FCP:UP6W:JWLO:R63J:ZUSC:D4Y7:3VXJ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
I have a simple Dockerfile
FROM alpine:3.4
COPY start.sh /
the start.sh
is inside same folder as Dockerfile
when docker build
, it shows:
Step 1 : FROM alpine:3.4
---> 4e38e38c8ce0
Step 2 : COPY start.sh /
stat /var/lib/docker/aufs/mnt/6379713235a0e7c418874544c96e44a92a142955b78251e8ccb8145b760db7ed/start.sh: no such file or directory
it worked before, while after installing docker-machine
and virtualbox
, it doesn’t work, don’t know if it related or not. Any idea, thank you in advance.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 42 (21 by maintainers)
Commits related to this issue
- Workaround Docker build bug - COPY and ADD to '/' fails due to this bug - Ref: docker/docker#25925 — committed to hwdsl2/docker-ipsec-vpn-server by hwdsl2 8 years ago
- workaround copy fails bug; https://github.com/docker/docker/issues/25925 — committed to yuuki0xff/docker-saku by yuuki0xff 8 years ago
- fix psql build errors on docker hub due to https://github.com/docker/docker/issues/25925 — committed to UN-OCHA/docker-images by teodorescuserban 8 years ago
I’m running into this exact issue:
Is latest Docker just f*ed up? Do we know which versions are affected?
I believe I was having this same problem and specifying the full path for the destination fixed it for me. For example changing:
to:
did the trick
Same problem for me on Xubuntu 16.04. Fixed with
sudo systemctl restart docker
.@thaJeztah this issue can appear on overlay driver as well.