Command

Docker Run a Container Interactively Command

The Docker command to run a container interactively is docker run -it ubuntu bash.

Quick Answer

Command
docker run -it ubuntu bash
DockerCommand

Run a Container Interactively

Type this command
docker run -it ubuntu bash

Opens a terminal inside a new container so you can type commands in it.

Learn More

How to run a container interactively in Docker

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

Docker Run a Container Interactively Command

Run docker run -it ubuntu bash.

Related Commands

Frequently asked questions

What is the Docker command to run a container interactively?

Run docker run -it ubuntu bash.

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