moby: Cannot overwrite file through volume - rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: not a directory"

Output of docker version:

Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   a5315b8
 Built:        Mon Apr 18 19:19:21 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 5
 Running: 2
 Paused: 0
 Stopped: 3
Images: 113
Server Version: 1.11.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 234
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.4.6
Operating System: Alpine Linux v3.3
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.956 GiB
Name: docker
ID: WC3R:KYCY:HVVL:HRWK:AV2K:HBZV:ZJQ5:PW5R:ZECN:H6X4:FH2H:SPS5
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): true
 File Descriptors: 43
 Goroutines: 67
 System Time: 2016-05-02T09:18:33.996759783Z
 EventsListeners: 1
Registry: https://index.docker.io/v1/

Additional environment details (AWS, VirtualBox, physical, etc.): phisical native beta on OSX, as per docker version output

Steps to reproduce the issue: 1.enable a file mount on my docker compose file, for instance this line - https://github.com/bizmate/nutch/blob/master/docker-compose.yml#L13 2. run docker-compose up -d

Describe the results you received: Starting data_mounts nutch_hbase_1 is up-to-date Recreating nutch

ERROR: for nutch rpc error: code = 2 desc = “oci runtime error: could not synchronise with container process: not a directory”

Describe the results you expected: I expect file mounts to overwrite existing files in the container using the host file content

Additional information you deem important (e.g. issue happens only occasionally): I have checked other issues and since i am on beta i suspect it might be something specific with it

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (13 by maintainers)

Most upvoted comments

To me, it looks like docker does not see a file that you are trying to mount and it is likely creating a dir, meanwhile in the container you have a file, and when it tries to bind-mount that the kernel throws the error ‘not a directory’.