官术网_书友最值得收藏!

Managing containers using Docker CLI

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 ps
CONTAINER 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. And the only way we can escape it is by sending a TERM signal (Ctrl + C) and killing it.

主站蜘蛛池模板: 翁源县| 东丰县| 夹江县| 沙坪坝区| 巨鹿县| 综艺| 水富县| 塘沽区| 旅游| 积石山| 昔阳县| 沁水县| 陇西县| 晋宁县| 余干县| 靖江市| 沙坪坝区| 上饶市| 韶山市| 河北省| 周口市| 从江县| 顺义区| 渑池县| 重庆市| 新干县| 抚远县| 丹阳市| 大邑县| 伊宁市| 石河子市| 吴忠市| 南康市| 象山县| 阿拉善右旗| 宁南县| 保康县| 蒙城县| 富平县| 盘山县| 中卫市|