Key Options For Docker Run Command
Options |
Usage |
---|---|
-d or |
It is used for running container in the background mode by freeing up the terminal of the specified docker container. |
–name |
It is used for assigning name to the container for easy identification of particular docker container. |
-p or –publish |
It is helpful in mapping the ports between the containers and the host system. This concept also called as port binding. |
-v or |
It is used for providing persistent volume by mounting the host directory to container file system .This concept known as volume binding. |
–env |
To set up environment variables inside the container. These optional flags are known as environmental variables used for providing information to inside the container. |
–env-file |
It options helps in reading the file of environmental variables |
–cpus |
used for specifying number of cpus |
–help |
prints docker run usage |
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.