mirror of
https://github.com/yeasy/docker_practice.git
synced 2025-08-02 22:11:38 +00:00
Change command docker ps to docker container ls #279
This commit is contained in:
@@ -46,18 +46,18 @@ $ docker build -t myweb:v1 .
|
||||
$ docker run -d --name web -p 80:80 myweb:v1
|
||||
```
|
||||
|
||||
当运行该镜像后,可以通过 `docker ps` 看到最初的状态为 `(health: starting)`:
|
||||
当运行该镜像后,可以通过 `docker container ls` 看到最初的状态为 `(health: starting)`:
|
||||
|
||||
```bash
|
||||
$ docker ps
|
||||
$ docker container ls
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
03e28eb00bd0 myweb:v1 "nginx -g 'daemon off" 3 seconds ago Up 2 seconds (health: starting) 80/tcp, 443/tcp web
|
||||
```
|
||||
|
||||
在等待几秒钟后,再次 `docker ps`,就会看到健康状态变化为了 `(healthy)`:
|
||||
在等待几秒钟后,再次 `docker container ls`,就会看到健康状态变化为了 `(healthy)`:
|
||||
|
||||
```bash
|
||||
$ docker ps
|
||||
$ docker container ls
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
03e28eb00bd0 myweb:v1 "nginx -g 'daemon off" 18 seconds ago Up 16 seconds (healthy) 80/tcp, 443/tcp web
|
||||
```
|
||||
|
Reference in New Issue
Block a user