- 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.
推薦閱讀
- 發布!設計與部署穩定的分布式系統(第2版)
- 白話區塊鏈
- Haskell Financial Data Modeling and Predictive Analytics
- 曝光:Linux企業運維實戰
- Installing and Configuring Windows 10:70-698 Exam Guide
- SharePoint 2013 應用開發實戰
- Windows 7案例教程
- Kali Linux高級滲透測試
- Kali Linux高級滲透測試(原書第3版)
- 鴻蒙HarmonyOS手機應用開發實戰
- Linux集群之美
- Mastering Sass
- Mastering Azure Serverless Computing
- 15分鐘!畫出我的漫畫角色:賣萌篇
- Command Line Fundamentals