Docker Community Forums

Share and learn in the Docker community.

`EOF` error when trying to run a container with `rshared` volume

(Errordeveloper) #1

Expected behavior

Container started with -v /:/roofs:rw,rshared should work, given root filesystem is mounted with RSHARED flag.

Actual behavior

Unexpected API error.


OS X: version 10.11.4 (build: 15E65) version v1.11.0-beta6
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160407-135400.tar.gz.
Your unique id in bugsnag is: 7E223336-054C-4D69-950E-C807DE9DD5FC
Please quote this in all correspondence.

Steps to reproduce the behavior

docker run --pid="host" --privileged="true" centos:7 nsenter --mount=/proc/1/ns/mnt -- mount --make-rshared /
docker run --volume="/:/rootfs:rw" centos:7 /bin/true
docker run --volume="/:/rootfs:rw,rshared" centos:7 /bin/true

The last command returns an error:

docker: An error occurred trying to connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.23/containers/a2f5181ef548172d68ab5aa8fafe7e7b55bb787e50aa4f1a38ef6ea807a61d31/start: EOF.

Running the same commands on a Docker Machine VM using 1.11-rc3 works fine:

env FUSION_BOOT2DOCKER_URL= docker-machine create -d vmwarefusion test-rc3
docker-machine ssh test-rc3 docker run --pid="host" --privileged="true" centos:7 nsenter --mount=/proc/1/ns/mnt -- mount --make-rshared /
docker-machine ssh test-rc3 docker run --volume="/:/rootfs:rw" centos:7 /bin/true
docker-machine ssh test-rc3 docker run --volume="/:/rootfs:rw,rshared" centos:7 /bin/true

(Errordeveloper) #2

Additionally, I’ve tested docker run --volume="/:/rootfs:rw,rshared" centos:7 /bin/true in the root shell and it works perfectly.

(Errordeveloper) #3

For the record, I’m not able to spot anything odd in the daemon logs, so it looks like the error might be purely on the OS X client side.

(Justin Cormack) #4

I don’t think it can be client side, not sure what could be the issue though.