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.

  • Dockerized jenkins is a good choice?
  • ignore service volumes_from
  • Openshift PaaS/Kubernetes Docker Container Monitoring and Orchestration
  • ONBUILD in nestled builded Docker images
  • Cannot change owner of Docker Volume directory to non-root user
  • Docker set up - cannot run hello-world
  • @EnableDiscoveryClient spring Boot service registration
  • gulp not running on Docker ubuntu
  • determine OS distribution of a docker image
  • Docker: what is the equivalent of the legacy --link parameter
  • Fluentd capture stack traces from Docker
  • Gradle not able to download andriod packages
  • 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.

    https://github.com/rhatdan/docker/blob/e6473011583967df4aa5a62f173fb421cae2bb1e/docs/sources/reference/commandline/cli.md

    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.