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

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker:containers:list_containers [2021/09/24 12:28] peterdocker: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 24: Line 24:
 ---- ----
  
-====== List all containers by their size ======+===== List all containers by their size =====
  
 <code bash> <code bash>
Line 34: 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.1632486522.txt.gz · Last modified: 2021/09/24 12:28 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki