Monday 3 June 2019

Docker: Get only the container ids


'docker container ls -aq' return container ids.

$docker container ls -a
CONTAINER ID        IMAGE               COMMAND                   CREATED             STATUS                         PORTS               NAMES
6b5c4275e9ae        tagsapp:2           "/bin/sh -c 'echo \"A…"   17 minutes ago      Exited (0) 17 minutes ago                          kind_lalande
26e63d610384        tagsapp:1           "/bin/sh -c 'echo \"A…"   19 minutes ago      Exited (0) 19 minutes ago                          loving_leakey
67874a629bee        tagsapp:latest      "/bin/sh -c 'echo \"I…"   19 minutes ago      Exited (0) 19 minutes ago                          heuristic_noether
b8b5a7ce77f4        tagsapp             "/bin/sh -c 'echo \"I…"   25 minutes ago      Exited (0) 25 minutes ago                          amazing_chaum
d9c68072f001        tagsapp:latest      "/bin/sh -c 'echo \"I…"   25 minutes ago      Exited (0) 25 minutes ago                          infallible_napier
375b83b37fcd        tagsapp:1           "/bin/sh -c 'echo \"A…"   25 minutes ago      Exited (0) 25 minutes ago                          keen_edison
f527c466bd20        tagsapp             "/bin/sh -c 'echo \"I…"   29 minutes ago      Exited (0) 29 minutes ago                          stupefied_shtern
35e231bd36f4        hello-world:linux   "/hello"                  About an hour ago   Exited (0) About an hour ago                       wonderful_lewin
1a9511808038        hello-world         "/hello"                  About an hour ago   Exited (0) About an hour ago                       xenodochial_mirzakhani
1cfdc9e8d5fc        a7d73a6dae7c        "/bin/sh -c 'java -j…"    3 hours ago         Exited (0) 3 hours ago                             jovial_joliot
11aebdb33ea2        dfc478d024ae        "/bin/sh -c 'java -j…"    3 hours ago         Exited (1) 3 hours ago                             brave_cray
3e5036a34ecf        e7d795f59293        "/bin/sh -c 'java -j…"    3 hours ago         Exited (1) 3 hours ago                             festive_aryabhata
a57db8e82ddb        c8cb97224038        "/bin/sh -c 'java -v…"    5 hours ago         Exited (0) 5 hours ago                             dreamy_mclean
b659d58de184        ed204233a34e        "/bin/sh -c 'echo \"W…"   5 hours ago         Exited (0) 5 hours ago                             lucid_gauss
$
$
$docker container ls -aq
6b5c4275e9ae
26e63d610384
67874a629bee
b8b5a7ce77f4
d9c68072f001
375b83b37fcd
f527c466bd20
35e231bd36f4
1a9511808038
1cfdc9e8d5fc
11aebdb33ea2
3e5036a34ecf
a57db8e82ddb
b659d58de184



Previous                                                 Next                                                 Home

No comments:

Post a Comment