What are the options for the “docker run” command?
The Docker run command has many options, here are some commonly used options:
- -d: Run the container as a background daemon in the future.
- Mapping the container’s port to the host’s port.
- -v: Mount the directory or file of the host to the directory or file of the container.
- –title: Assign a name to the container.
- –restart: Specifies the restart policy for the container after it exits.
- – e: establish environment variables
- –link: Connect other containers to a running container.
- –network: Specifies the network mode for the container.
- – volume: set up persistent storage for the container.
- –rm: Automatically remove container when it exits.
These are just a few common parameters, there are many other parameters available with the docker run command. You can use the docker run –help command to see all available parameters.