Forrest logo
back to the docker tool

docker:tldr:a99e7

docker: Start a container from an image, with a custom name.
$ docker run --name ${container_name} ${image}
try on your machine

The command "docker run" is used to create and start a new container from a Docker image.

Here is the breakdown of the command with placeholders:

  • --name: This option allows you to specify a custom name for the container. It is followed by the placeholder ${container_name}, which should be replaced with the desired name when running the command.
  • ${container_name}: This placeholder refers to the name you want to assign to the container. Replace it with the desired name.
  • ${image}: This placeholder refers to the Docker image you want to use to create the container. Replace it with the name (or ID) of the image you want to use.

Overall, the command is asking Docker to create and start a new container using the specified image and assign it the provided container name.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool