Command

Docker Run a Container Command

The Docker command to run a container is docker run.

Quick Answer

Command
docker run
DockerCommand

Run a Container

Type this command
docker run

Creates a container from an image and starts it. Add -d to run it in the background.

Tip: docker run -it ubuntu bash opens an interactive shell in a new container.

Learn More

How to run a container in Docker

  1. Open the terminal or command interface for Docker.
  2. Type docker run, replace any placeholders, and run it.

Tip: docker run -it ubuntu bash opens an interactive shell in a new container.

Docker Run a Container Command

Run docker run.

Related Commands

Frequently asked questions

What is the Docker command to run a container?

Run docker run.

Where do I type this Docker command?

Type it in the terminal or command-line interface used by Docker.

Does this Docker command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify