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

  • Learn OpenShift
  • Denis Zuev Artemii Kropachev Aleksey Usov
  • 140字
  • 2021-08-13 16:03:46

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.

主站蜘蛛池模板: 伊通| 米脂县| 谢通门县| 河间市| 延吉市| 宜春市| 原阳县| 成都市| 普格县| 余庆县| 芦溪县| 海晏县| 安乡县| 杨浦区| 民乐县| 贵港市| 宝清县| 房山区| 阳泉市| 若尔盖县| 怀集县| 陵川县| 安乡县| 商南县| 滦南县| 漳州市| 康乐县| 如皋市| 淮南市| 安多县| 芜湖市| 滨州市| 淳化县| 长宁县| 沁水县| 赤壁市| 铁力市| 静乐县| 广德县| 宕昌县| 通辽市|