...

/

Starting a Container

Starting a Container

Learn how to start a Docker container using the docker run command.

We'll cover the following...

The docker run command is the simplest and most common way to start a new container. Run the following command to start a new container called webserver.

$ docker run -d --name webserver -p 5005:8080 nigelpoulton/ddd-book:web0.1
Unable to find image 'nigelpoulton/ddd-book:web0.1' locally
web0.1: Pulling from nigelpoulton/ddd-book
4f4fb700ef54: Already exists
cf2a607f33f7: Download complete
0a1f0c111e9a: Download complete
c1af4b5db242: Download complete
Digest: sha256:3f5b281b914b1e39df8a1fbc189270a5672ff9e98bfac03193b42d1c02c43ef0
Status: Downloaded newer image for nigelpoulton/ddd-book:web0.1
b5594b3b8b3fdce544d2ca048e4340d176bce9f5dc430812a20f1852c395e96b
Starting a docker container

Explanation

Let’s take a closer look at ...

Access this course and 1400+ top-rated courses and projects.