Difference between revisions of "Docker ps"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(23 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
<code>docker ps</code> list containers | <code>docker ps</code> list containers | ||
* https://docs.docker.com/engine/reference/commandline/ps/ | * https://docs.docker.com/engine/reference/commandline/ps/ | ||
+ | docker ps | ||
+ | docker ps -a | ||
+ | docker ps -a [[-f]]=name=[[etcd]]$ | ||
+ | [[docker ps -q]] | ||
+ | [[docker ps --size]] | ||
+ | <nowiki>docker ps -a --format '{{ .ID }}'</nowiki> | ||
− | + | == Examples == | |
+ | docker ps | ||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | ||
− | b505ff9b5560 gitlab/gitlab-ee:11.3.1-ee.0 "/assets/wrapper" 6 days ago Up 25 seconds (health: | + | b505ff9b5560 gitlab/[[gitlab-ee]]:11.3.1-ee.0 "/assets/wrapper" 6 days ago Up 25 seconds (health: |
starting) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:5001->5001/tcp, 0.0.0.0:2224->22/tcp gitlab-web | starting) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:5001->5001/tcp, 0.0.0.0:2224->22/tcp gitlab-web | ||
− | * <code>docker ps -a</code> | + | * <code>[[docker ps -a]]</code> |
* <code>docker ps -a -q</code> | * <code>docker ps -a -q</code> | ||
+ | [[docker ps -aq]] | ||
docker ps | docker ps | ||
− | Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? | + | Cannot connect to the Docker daemon at unix://[[/var/run/docker.sock]]. Is the docker daemon running? |
+ | docker ps | ||
+ | Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial | ||
+ | unix [[/var/run/docker.sock]]: connect: permission denied | ||
+ | |||
+ | Solution: <code>[[sudo docker ps]]</code> | ||
docker ps | docker ps | ||
− | + | bash: /usr/local/bin/docker: No such file or directory | |
− | + | ||
+ | docker ps | ||
+ | bash: docker: command not found | ||
== Related commands == | == Related commands == | ||
* <code>[[docker start]]</code> | * <code>[[docker start]]</code> | ||
* <code>[[systemctl status docker]]</code> | * <code>[[systemctl status docker]]</code> | ||
+ | * <code>[[journalctl -u docker]]</code> | ||
* <code>[[docker inspect]]</code> | * <code>[[docker inspect]]</code> | ||
* <code>[[ps]]</code> | * <code>[[ps]]</code> | ||
− | + | ||
* <code>[[docker-compose ps]]</code> | * <code>[[docker-compose ps]]</code> | ||
* <code>[[docker container stop $(docker container ls -aq)]]</code> | * <code>[[docker container stop $(docker container ls -aq)]]</code> | ||
+ | * <code>[[docker logs]]</code> | ||
== See also == | == See also == | ||
− | * {{docker}} | + | * {{docker ps}} |
+ | * {{ps}} | ||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 08:51, 18 April 2024
docker ps
list containers
docker ps docker ps -a docker ps -a -f=name=etcd$ docker ps -q docker ps --size docker ps -a --format '{{ .ID }}'
Examples[edit]
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b505ff9b5560 gitlab/gitlab-ee:11.3.1-ee.0 "/assets/wrapper" 6 days ago Up 25 seconds (health: starting) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:5001->5001/tcp, 0.0.0.0:2224->22/tcp gitlab-web
docker ps -a
docker ps -a -q
docker ps -aq
docker ps Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial
unix /var/run/docker.sock: connect: permission denied
Solution: sudo docker ps
docker ps bash: /usr/local/bin/docker: No such file or directory
docker ps bash: docker: command not found
Related commands[edit]
See also[edit]
Advertising: