Mount Volume Read Only (–read-only)
On using volumes in combination with the –read-only flag helps in controlling the writing permissions of a file. The following command illustrates it clearly as the read-only flag mounted to container’s root filesystem allowing only to read and prohibiting the write permissions to location other other than the specified volumes for the container.
docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/static-docker-binary:/usr/bin/docker busybox sh
Docker Run Command | Complete Tutorial
Docker launches the containers in seconds, and the heart of running containerized applications lies in the powerful command known as ‘docker run‘. Docker is the Container Platform tool. It helps in packaging an application with all its dependencies into a single entity, and it supports running the applications as containerized images on any platform that supports Docker. It acts as a gateway for deploying and managing the Docker containers.