Suggest an editImprove this articleRefine the answer for “How to run a docker container?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A **container** is started with the `docker run` command, specifying the image it should be created from. **Key point:** `run` **creates** and **starts** a container; when the main process inside the container finishes, the container stops.Shown above the full answer for quick recall.Answer (EN)ImageA container is started with the `docker run` command, specifying the image it should be created from. ### **Basic example** ```bash docker run IMAGE_NAME ``` If the image is not downloaded locally, Docker will download it from a registry (for example, from Docker Hub). ### **Run a container in interactive mode (with a terminal)** ```bash docker run -it IMAGE_NAME ``` ### **Run a container in the background (detached mode)** ```bash docker run -d IMAGE_NAME ``` ### **Run with port mapping (for web applications)** ```bash docker run -d -p 8080:80 IMAGE_NAME ``` where `8080` is the port on the host, `80` is the port inside the container. ### **Run with a name** ```bash docker run --name my_container IMAGE_NAME ``` ### **What's important to remember** - `run` **creates** and **starts** a container. - When the main process inside the container finishes, the container stops. If you want, I can show how to run with a volume, with environment variables, or how to view container logs and state.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.