Docker run

13 Apr 2019

Genral form

docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

An image developer can define image defaults related to:

Operator exclusive options

Detached vs foreground

Container identification

If you do not assign a container name with the --name option, then the daemon generates a random string name for you. Defining a name can be a handy way to add meaning to a container

PID equivalent

Image[:tag]

While not strictly a means of identifying a container, you can specify a version of an image you’d like to run the container with by adding image[:tag] to the command. For example, docker run ubuntu:14.04.