July 2018
Intermediate to advanced
504 pages
11h 34m
English
The next step is to actually run a container from the image we pulled from Docker Hub or a private registry in the previous chapter. We are going to use the docker run command to run a container. Before we do that, let's check if we have any containers running already by using the docker ps command:
$ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAME
Run a container with the docker run command:
$ docker run httpd
The output of the preceding command will be as shown in the following screenshot:

The container is running, but we cannot leave the terminal and continue working in the foreground. ...
Read now
Unlock full access