what is 'z' flag in docker container's volumes-from option?

While going through the docker docs, I came across volumes-from (https://docs.docker.com/engine/reference/commandline/run/) option for docker run command.
I didn’t understand the differences between ro, rw, and z option provided as-
$ docker run --volumes-from ba8c0c54f0f2:ro -i -t ubuntu pwd
In the above command the ro option is replaced with z. I will be thankful if anyone explores on differences of using these options.

  • Docker pull shows “Unknown blob”
  • Dockerfile unexpected behaviour between RUN commands
  • automated way for choosing browser version for end-to-end testing?
  • Using mysql image from docker
  • How can I make docker-compose build an image from a remote git repository?
  • GitLab Ci with docker runner - Multiple Stages
  • Error run scrapy after install docker
  • Fluentd capture stack traces from Docker
  • Monolithic (vs) Micro-services ==> Threads (vs) Process
  • Connect docker container to database in host's local network
  • Terraform unable to get docker to join swarm
  • Making a web server with Docker instances - What goes Where?
  • 2 Solutions collect form web for “what is 'z' flag in docker container's volumes-from option?”

    Two suffixes :z or :Z can be added to the volume mount. These suffixes tell Docker to relabel file objects on the shared volumes. The ‘z’ option tells Docker that the volume content will be shared between containers. Docker will label the content with a shared content label. Shared volumes labels allow all containers to read/write content. The ‘Z’ option tells Docker to label the content with a private unshared label.


    docker run –volumes-from a64f10cd5f0e:z -i -t rhel6 bin/bash

    I have tested it, i have mounted in one container and from that container to another newly container. IT goes with rw option

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.