# How to Run a Docker Image as a Container?

Docker runs processes in isolated containers. A container is a process that runs on a host. The host may be local or remote. When an operator executes `docker run`, the container process that runs is isolated in that it has its own file system, its own networking, and its own isolated process tree separate from the host.

The specific way to run it depends on whether you gave the image a tag or name.

To see if your docker image has a name, list the images using the docker images command and look for the tag or repository column:

```bash
docker images
```

```bash
Output:
REPOSITORY          TAG                 ID                  CREATED             SIZE
ubuntu              12.04               8dbd9e392a96        4 months ago        131.5 MB (virtual 131.5 MB)
```

To run a Docker image with a name, use the following syntax:

```bash
docker run -i -t ubuntu:12.04 /bin/bash
```

To run a Docker image with the image id, use the following syntax

```bash
docker run -i -t 8dbd9e392a96 /bin/bash
```
