"도커 컨테이너 목록 조회 docker ps"의 두 판 사이의 차이

 
(사용자 2명의 중간 판 9개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{소문자}}
==개요==
==개요==
;docker ps
;docker ps
* 구동중(running)인 컨테이너 목록을 보여주는 docker 명령어


<source lang='console'>
<syntaxhighlight lang='console'>
$ docker run -d --name redisHostPort -p 6379:6379 redis:latest
$ docker run -d --name redisHostPort -p 6379:6379 redis:latest
202d4e2003757b4533936b64ef64a72f15d68885e040bf84bf68a86d2cecb8f8
202d4e2003757b4533936b64ef64a72f15d68885e040bf84bf68a86d2cecb8f8
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
$ docker ps -f name=redisHostPort
$ docker ps -f name=redisHostPort
CONTAINER ID        IMAGE              COMMAND                  CREATED            STATUS              PORTS                    NAMES
CONTAINER ID        IMAGE              COMMAND                  CREATED            STATUS              PORTS                    NAMES
202d4e200375        redis:latest        "docker-entrypoint.s…"  3 minutes ago      Up 3 minutes        0.0.0.0:6379->6379/tcp  redisHostPort
202d4e200375        redis:latest        "docker-entrypoint.s…"  3 minutes ago      Up 3 minutes        0.0.0.0:6379->6379/tcp  redisHostPort
</source>
</syntaxhighlight>


----
----
<source lang='console'>
<syntaxhighlight lang='console'>
root@default:~# docker start mycentos
root@default:~# docker start mycentos
mycentos
mycentos
23번째 줄: 25번째 줄:
915fc132bee4        centos:7            "/bin/bash"        2 hours ago        Up 16 seconds                                mycentos
915fc132bee4        centos:7            "/bin/bash"        2 hours ago        Up 16 seconds                                mycentos
0967afc19f46        ubuntu:14.04        "/bin/bash"        2 hours ago        Exited (0) 2 hours ago                      friendly_albattani
0967afc19f46        ubuntu:14.04        "/bin/bash"        2 hours ago        Exited (0) 2 hours ago                      friendly_albattani
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
root@default:~# docker stop mycentos
root@default:~# docker stop mycentos
mycentos
mycentos
33번째 줄: 35번째 줄:
915fc132bee4        centos:7            "/bin/bash"        2 hours ago        Exited (137) 6 seconds ago                      mycentos
915fc132bee4        centos:7            "/bin/bash"        2 hours ago        Exited (137) 6 seconds ago                      mycentos
0967afc19f46        ubuntu:14.04        "/bin/bash"        2 hours ago        Exited (0) 2 hours ago                          friendly_albattani
0967afc19f46        ubuntu:14.04        "/bin/bash"        2 hours ago        Exited (0) 2 hours ago                          friendly_albattani
</source>
</syntaxhighlight>


----
----
<source lang='console'>
<syntaxhighlight lang='console'>
$ docker ps
$ docker ps
CONTAINER ID        IMAGE                                        COMMAND            CREATED            STATUS              PORTS              NAMES
CONTAINER ID        IMAGE                                        COMMAND            CREATED            STATUS              PORTS              NAMES
51번째 줄: 53번째 줄:
8403249a8593        gcr.io/google-containers/kube-addon-manager  "/opt/kube-addons.sh"    18 seconds ago      Up 18 seconds                          k8s_kube-addon-manager_kube-addon-manager-host01_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0
8403249a8593        gcr.io/google-containers/kube-addon-manager  "/opt/kube-addons.sh"    18 seconds ago      Up 18 seconds                          k8s_kube-addon-manager_kube-addon-manager-host01_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0
147d788bfa22        gcr.io/google_containers/pause-amd64:3.0      "/pause"            18 seconds ago      Up 18 seconds                          k8s_POD_kube-addon-manager-host01_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0
147d788bfa22        gcr.io/google_containers/pause-amd64:3.0      "/pause"            18 seconds ago      Up 18 seconds                          k8s_POD_kube-addon-manager-host01_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
{{z컬럼3|
* [[docker ps -a]]
* [[docker run]]
** [[docker run -d]]
* [[docker logs]]
* [[docker start]]
* [[docker start]]
* [[docker stop]]
* [[docker stop]]
* [[docker logs]]
* [[docker inspect]]
* [[docker inspect]]
* [[docker 명령어]]
* [[docker 명령어]]
* [[리눅스 ps]]
* [[docker container ls]]
* [[docker container ls]]
* [[docker container ls 와 docker ps 의 차이점]]
* [[docker container ls 와 docker ps 의 차이점]]
* [[docker compose ps]]
}}


[[분류: docker]]
[[분류: docker]]

2023년 1월 20일 (금) 01:23 기준 최신판

1 개요[ | ]

docker ps
  • 구동중(running)인 컨테이너 목록을 보여주는 docker 명령어
$ docker run -d --name redisHostPort -p 6379:6379 redis:latest
202d4e2003757b4533936b64ef64a72f15d68885e040bf84bf68a86d2cecb8f8
$ docker ps -f name=redisHostPort
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
202d4e200375        redis:latest        "docker-entrypoint.s…"   3 minutes ago       Up 3 minutes        0.0.0.0:6379->6379/tcp   redisHostPort

root@default:~# docker start mycentos
mycentos
root@default:~# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
915fc132bee4        centos:7            "/bin/bash"         8 minutes ago       Up 1 second                             mycentos
root@default:~# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                   PORTS               NAMES
915fc132bee4        centos:7            "/bin/bash"         2 hours ago         Up 16 seconds                                mycentos
0967afc19f46        ubuntu:14.04        "/bin/bash"         2 hours ago         Exited (0) 2 hours ago                       friendly_albattani
root@default:~# docker stop mycentos
mycentos
root@default:~# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
root@default:~# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                       PORTS               NAMES
915fc132bee4        centos:7            "/bin/bash"         2 hours ago         Exited (137) 6 seconds ago                       mycentos
0967afc19f46        ubuntu:14.04        "/bin/bash"         2 hours ago         Exited (0) 2 hours ago                           friendly_albattani

$ docker ps
CONTAINER ID        IMAGE                                         COMMAND             CREATED             STATUS              PORTS               NAMES
c5c6daded49b        gcr.io/k8s-minikube/storage-provisioner       "/storage-provisioner"   9 seconds ago       Up 9 seconds                            k8s_storage-provisioner_storage-provisioner_kube-system_36139fd4-468f-11e8-be58-0242ac110022_0
19ef37a5d30c        gcr.io/google_containers/pause-amd64:3.0      "/pause"             10 seconds ago      Up 9 seconds                            k8s_POD_storage-provisioner_kube-system_36139fd4-468f-11e8-be58-0242ac110022_0
d8b49bc9f8e3        jocatalin/kubernetes-bootcamp                 "/bin/sh -c'node ..."   10 seconds ago      Up 10 seconds                           k8s_kubernetes-bootcamp_kubernetes-bootcamp-5dbf48f7d4-mgsjj_default_359b9325-468f-11e8-be58-0242ac110022_0
6e4433f3f2a9        gcr.io/google_containers/pause-amd64:3.0      "/pause"             10 seconds ago      Up 10 seconds                           k8s_POD_kubernetes-bootcamp-5dbf48f7d4-mgsjj_default_359b9325-468f-11e8-be58-0242ac110022_0
bb1c7db4e568        k8s.gcr.io/k8s-dns-sidecar-amd64              "/sidecar --v=2 --..."   12 seconds ago      Up 12 seconds                           k8s_sidecar_kube-dns-54cccfbdf8-w5fl5_kube-system_36844e0e-468f-11e8-be58-0242ac110022_0
b9b25f005157        k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64        "/dnsmasq-nanny -v..."   12 seconds ago      Up 12 seconds                           k8s_dnsmasq_kube-dns-54cccfbdf8-w5fl5_kube-system_36844e0e-468f-11e8-be58-0242ac110022_0
f5200e0a24ca        k8s.gcr.io/k8s-dns-kube-dns-amd64             "/kube-dns --domai..."   12 seconds ago      Up 12 seconds                           k8s_kubedns_kube-dns-54cccfbdf8-w5fl5_kube-system_36844e0e-468f-11e8-be58-0242ac110022_0
e9b2305290e5        k8s.gcr.io/kubernetes-dashboard-amd64         "/dashboard--inse..."   13 seconds ago      Up 12 seconds                           k8s_kubernetes-dashboard_kubernetes-dashboard-77d8b98585-2lzsn_kube-system_366bfe9e-468f-11e8-be58-0242ac110022_0
87f174ce61cb        gcr.io/google_containers/pause-amd64:3.0      "/pause"             13 seconds ago      Up 12 seconds                           k8s_POD_kube-dns-54cccfbdf8-w5fl5_kube-system_36844e0e-468f-11e8-be58-0242ac110022_0
8b1d9174269b        gcr.io/google_containers/pause-amd64:3.0      "/pause"             13 seconds ago      Up 12 seconds                           k8s_POD_kubernetes-dashboard-77d8b98585-2lzsn_kube-system_366bfe9e-468f-11e8-be58-0242ac110022_0
8403249a8593        gcr.io/google-containers/kube-addon-manager   "/opt/kube-addons.sh"    18 seconds ago      Up 18 seconds                           k8s_kube-addon-manager_kube-addon-manager-host01_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0
147d788bfa22        gcr.io/google_containers/pause-amd64:3.0      "/pause"             18 seconds ago      Up 18 seconds                           k8s_POD_kube-addon-manager-host01_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}