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.

  • “Permission denied” in Docker container unless --privileged=true
  • Logstash Configuration file in Docker ELK Compose file
  • Multiple folders in one docker volume
  • Bridge docker container port to host port
  • Cannot install Python Package with docker-compose
  • Installing a .exe on a windows container
  • Docker connection refused hanging Django
  • Graylog docker container only binds when it listens to and not
  • Automatically configure Java to use the maximum RAM allocated to its Docker container
  • Cannot push images to Dockerhub
  • New install of Docker Toolbox yields “AppleEvent timed out.” error
  • Cannot run asp.net 5 from docker
  • 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.