Question about mount mode.
File: storage/volumes.md
Question
Q: The actual mode is z, not ro,why ?
Run:
docker run -d \
--name=nginxtest \
--mount source=nginx-vol,destination=/usr/share/nginx/html,readonly \
nginx:latest
Use docker inspect nginxtest to verify that the readonly mount was created correctly. Look for the Mounts section:
"Mounts": [
{
"Type": "volume",
"Name": "nginx-vol",
"Source": "/var/lib/docker/volumes/nginx-vol/_data",
"Destination": "/usr/share/nginx/html",
"Driver": "local",
"Mode": "z",
"RW": false,
"Propagation": ""
}
],
Env
$ docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:21:31 2018
OS/Arch: darwin/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:29:02 2018
OS/Arch: linux/amd64
Experimental: true
$ docker info
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 20
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.93-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.46GiB
Name: linuxkit-025000000001
ID: NP2D:KF6O:NH3G:TAOA:NJV4:G4RQ:PKE4:3NLC:ZCKY:XSB6:I6PW:MER4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 26
Goroutines: 53
System Time: 2018-09-22T16:05:26.1718392Z
EventsListeners: 2
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
@bermudezmt PTAL
@bermudezmt It looks like @bbbmj loves what you did :) Ok to merge?
Hey @bbbmj , I've been pretty slammed but checked this just now. I'm seeing the same mount output as in the doc:
"Mounts": [
{
"Type": "volume",
"Name": "nginx-vol",
"Source": "/var/lib/docker/volumes/nginx-vol/_data",
"Destination": "/usr/share/nginx/html",
"Driver": "local",
"Mode": "",
"RW": false,
"Propagation": ""
}
]
I am however running Docker EE 2.0. Did you check with other version of Docker CE?
Thanks to your reply @bermudezmt
Both in my Mac and VM, it's output z

VM Env
$ docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:03 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:25:29 2018
OS/Arch: linux/amd64
Experimental: false
$ uname -a
Linux qa4v44 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@thaJeztah would you happen to know why this is the case for 18.06.1-ce? I'm seeing an empty value for mount mode running the example command on Docker EE 2.0 (17.06.2-ee-16) which is what we're showing in the docs.
@mark-church Assigned to you as not a docs issue.
Looks like this may be related to a fix that is in Docker 17.09, but not in 17.06; https://github.com/moby/moby/pull/34684. I see it was backported at some point, but reverted (I'll check what's the reason for that)
Looks like that patch caused some issues in tests. Later versions use a different implementation which may not have that issue
@bbbmj I hope your original question had been answered by @thaJeztah above. Please feel free to submit another issue if this isn't the case. Thanks!
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked