User Tools

Site Tools


docker:containers:list_containers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docker:containers:list_containers [2020/11/11 10:42] – created 192.168.1.1docker:containers:list_containers [2022/09/19 14:25] (current) peter
Line 1: Line 1:
 ====== Docker - Containers - List Containers ====== ====== Docker - Containers - List Containers ======
  
-====== List all Docker containers by their ID ======+===== List all Docker containers by their ID =====
  
 <code bash> <code bash>
Line 16: Line 16:
  
 <code bash> <code bash>
-docker container ls -qa+e95f533e272a 
 +e577b06039b9 
 +8e38cc315dc0 
 +f16fe523ce59
 </code> </code>
  
 ---- ----
  
-====== List all containers by their size ======+===== List all containers by their size =====
  
 <code bash> <code bash>
Line 31: Line 34:
 <code bash> <code bash>
 docker container ls -s docker container ls -s
 +</code>
 +
 +returns:
 +
 +<code bash>
 +CONTAINER ID   IMAGE                 COMMAND        CREATED        STATUS       PORTS                                       NAMES              SIZE
 +8e38cc315dc0   portainer/portainer   "/portainer"   7 months ago   Up 2 weeks   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp   sad_varahamihira   0B (virtual 79.1MB)
 </code> </code>
  
 ---- ----
  
-====== Lst all containers by their name and status ======+===== List all containers by their name and status =====
  
 <code bash> <code bash>
 docker container ls --format 'table {{.Names}}\t{{.Status}}' docker container ls --format 'table {{.Names}}\t{{.Status}}'
 +</code>
 +
 +returns:
 +
 +<code bash>
 +NAMES              STATUS
 +sad_varahamihira   Up 2 weeks
 </code> </code>
  
 ---- ----
  
docker/containers/list_containers.1605091375.txt.gz · Last modified: 2020/11/11 10:42 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki