using docker(# delete all images)
docker에서 image 컨트롤 하기
## list docker images
[root@kylin ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 301e9cdfb430 15 minutes ago 202 MB
<none> <none> bff5a7192151 13 hours ago 64.2 MB
<none> <none> 6cbb0afcaacc 14 hours ago 64.2 MB
<none> <none> c450412ba8f1 15 hours ago 120 MB
<none> <none> 4ab8e74ee739 15 hours ago 311 MB
<none> <none> 0a848886a22d 21 hours ago 311 MB
docker.io/ubuntu 18.04 a2a15febcdf3 45 hours ago 64.2 MB
docker.io/ubuntu latest a2a15febcdf3 45 hours ago 64.2 MB
hadoop1 latest ff75e855b251 12 days ago 1.7 GB
docker.io/ubuntu 16.04 5e13f8dd4c1a 3 weeks ago 120 MB
docker.io/ubuntu 14.04 2c5e00d77a67 3 months ago 188 MB
docker.io/centos latest 9f38484d220f 5 months ago 202 MB
docker.io/java 8-jre e44d62cf8862 2 years ago 311 MB
docker.io/kiwenlau/hadoop 1.0 a59a34125272 3 years ago 829 MB
## all list docker containers
[root@kylin ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae76b9cf03b4 2c5e00d77a67 "/bin/sh -c 'apt-g..." 5 minutes ago Exited (100) 4 minutes ago determined_nightingale
4ee50829b69d 301e9cdfb430 "/bin/sh -c 'yum u..." 18 minutes ago Exited (1) 18 minutes ago zealous_einstein
f74c569b7998 bff5a7192151 "/bin/sh -c 'set -..." 13 hours ago Exited (100) 13 hours ago heuristic_brahmagupta
d1e6b6196a76 67393d3ee654 "/bin/sh -c 'set -..." 14 hours ago Exited (100) 14 hours ago elated_visvesvaraya
1be614ee7b81 c450412ba8f1 "/bin/sh -c 'set -..." 14 hours ago Exited (100) 14 hours ago inspiring_newton
cde7cffa730b c450412ba8f1 "/bin/sh -c 'nsloo..." 14 hours ago Exited (127) 14 hours ago focused_golick
ccaa982b5ed1 c450412ba8f1 "/bin/sh -c 'nsloo..." 15 hours ago Exited (127) 15 hours ago lucid_darwin
8a3c12f7001b c450412ba8f1 "/bin/sh -c 'set -..." 15 hours ago Exited (100) 15 hours ago dreamy_franklin
a8fab6d68f68 4ab8e74ee739 "/bin/sh -c 'set -..." 15 hours ago Exited (100) 15 hours ago flamboyant_saha
1a22c896b281 0a848886a22d "/bin/sh -c 'set -..." 15 hours ago Exited (100) 15 hours ago heuristic_babbage
df66d61e82f4 0a848886a22d "/bin/sh -c 'set -..." 22 hours ago Exited (100) 22 hours ago ecstatic_montalcini
9dde9553ec15 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 10 days ago Exited (137) 4 days ago hadoop-slave2
8eb410685505 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 10 days ago Exited (137) 4 days ago hadoop-slave1
e6188acca7ea kiwenlau/hadoop:1.0 "sh -c 'service ss..." 10 days ago Exited (137) 4 days ago hadoop-master
[root@kylin ~]#
## delete all containers
[root@kylin ~]# docker rm `docker ps -a -q`
ae76b9cf03b4
4ee50829b69d
f74c569b7998
d1e6b6196a76
1be614ee7b81
cde7cffa730b
ccaa982b5ed1
8a3c12f7001b
a8fab6d68f68
1a22c896b281
df66d61e82f4
9dde9553ec15
8eb410685505
e6188acca7ea
[root@kylin ~]#
[root@kylin ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
## delete all images
[root@kylin ~]# docker rmi $(docker images -q)
Untagged: sungminyun/kylin-docker:152
Deleted: sha256:0f897545f01282ac81fc355fa226abffa40452eef6865d45fdb36ef7bba025ba
Deleted: sha256:26d9c1aea0b5feb459c092f4cb6a442caeecc15be6b0339d15f697a78efd8d72
Deleted: sha256:385cdfa37dbe548b22986a56deca737ba39fe0a91a30ce89d18def6507960dca
Untagged: docker.io/ubuntu:14.04
Untagged: docker.io/ubuntu@sha256:2f7c79927b346e436cc14c92bd4e5bd778c3bd7037f35bc639ac1589a7acfa90
Deleted: sha256:2c5e00d77a67934d5e39493477f262b878f127b9c01b491f06d8f06f78819578
Deleted: sha256:664a2bb343be8b1a691e0ce9c563ee654c30a1c694dc1b25ebb5467fa3d074fd
Deleted: sha256:4ac0c5a114c714b429ff471f5415974618e0b6fc743070d445cd0e2ac586cc7b
Deleted: sha256:5f200444c0009c41eb39bc1cf37a5b3c2e953478f2f373c5a1873dee820e0ced
Deleted: sha256:b057ab380990c219581e3b074919413ebe31079cbd0d615f63872c471b4dc633
[root@kylin ~]#
## list docker images
[root@kylin ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 301e9cdfb430 15 minutes ago 202 MB
<none> <none> bff5a7192151 13 hours ago 64.2 MB
<none> <none> 6cbb0afcaacc 14 hours ago 64.2 MB
<none> <none> c450412ba8f1 15 hours ago 120 MB
<none> <none> 4ab8e74ee739 15 hours ago 311 MB
<none> <none> 0a848886a22d 21 hours ago 311 MB
docker.io/ubuntu 18.04 a2a15febcdf3 45 hours ago 64.2 MB
docker.io/ubuntu latest a2a15febcdf3 45 hours ago 64.2 MB
hadoop1 latest ff75e855b251 12 days ago 1.7 GB
docker.io/ubuntu 16.04 5e13f8dd4c1a 3 weeks ago 120 MB
docker.io/ubuntu 14.04 2c5e00d77a67 3 months ago 188 MB
docker.io/centos latest 9f38484d220f 5 months ago 202 MB
docker.io/java 8-jre e44d62cf8862 2 years ago 311 MB
docker.io/kiwenlau/hadoop 1.0 a59a34125272 3 years ago 829 MB
## all list docker containers
[root@kylin ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae76b9cf03b4 2c5e00d77a67 "/bin/sh -c 'apt-g..." 5 minutes ago Exited (100) 4 minutes ago determined_nightingale
4ee50829b69d 301e9cdfb430 "/bin/sh -c 'yum u..." 18 minutes ago Exited (1) 18 minutes ago zealous_einstein
f74c569b7998 bff5a7192151 "/bin/sh -c 'set -..." 13 hours ago Exited (100) 13 hours ago heuristic_brahmagupta
d1e6b6196a76 67393d3ee654 "/bin/sh -c 'set -..." 14 hours ago Exited (100) 14 hours ago elated_visvesvaraya
1be614ee7b81 c450412ba8f1 "/bin/sh -c 'set -..." 14 hours ago Exited (100) 14 hours ago inspiring_newton
cde7cffa730b c450412ba8f1 "/bin/sh -c 'nsloo..." 14 hours ago Exited (127) 14 hours ago focused_golick
ccaa982b5ed1 c450412ba8f1 "/bin/sh -c 'nsloo..." 15 hours ago Exited (127) 15 hours ago lucid_darwin
8a3c12f7001b c450412ba8f1 "/bin/sh -c 'set -..." 15 hours ago Exited (100) 15 hours ago dreamy_franklin
a8fab6d68f68 4ab8e74ee739 "/bin/sh -c 'set -..." 15 hours ago Exited (100) 15 hours ago flamboyant_saha
1a22c896b281 0a848886a22d "/bin/sh -c 'set -..." 15 hours ago Exited (100) 15 hours ago heuristic_babbage
df66d61e82f4 0a848886a22d "/bin/sh -c 'set -..." 22 hours ago Exited (100) 22 hours ago ecstatic_montalcini
9dde9553ec15 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 10 days ago Exited (137) 4 days ago hadoop-slave2
8eb410685505 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 10 days ago Exited (137) 4 days ago hadoop-slave1
e6188acca7ea kiwenlau/hadoop:1.0 "sh -c 'service ss..." 10 days ago Exited (137) 4 days ago hadoop-master
[root@kylin ~]#
## delete all containers
[root@kylin ~]# docker rm `docker ps -a -q`
ae76b9cf03b4
4ee50829b69d
f74c569b7998
d1e6b6196a76
1be614ee7b81
cde7cffa730b
ccaa982b5ed1
8a3c12f7001b
a8fab6d68f68
1a22c896b281
df66d61e82f4
9dde9553ec15
8eb410685505
e6188acca7ea
[root@kylin ~]#
[root@kylin ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
## delete all images
[root@kylin ~]# docker rmi $(docker images -q)
Untagged: sungminyun/kylin-docker:152
Deleted: sha256:0f897545f01282ac81fc355fa226abffa40452eef6865d45fdb36ef7bba025ba
Deleted: sha256:26d9c1aea0b5feb459c092f4cb6a442caeecc15be6b0339d15f697a78efd8d72
Deleted: sha256:385cdfa37dbe548b22986a56deca737ba39fe0a91a30ce89d18def6507960dca
Untagged: docker.io/ubuntu:14.04
Untagged: docker.io/ubuntu@sha256:2f7c79927b346e436cc14c92bd4e5bd778c3bd7037f35bc639ac1589a7acfa90
Deleted: sha256:2c5e00d77a67934d5e39493477f262b878f127b9c01b491f06d8f06f78819578
Deleted: sha256:664a2bb343be8b1a691e0ce9c563ee654c30a1c694dc1b25ebb5467fa3d074fd
Deleted: sha256:4ac0c5a114c714b429ff471f5415974618e0b6fc743070d445cd0e2ac586cc7b
Deleted: sha256:5f200444c0009c41eb39bc1cf37a5b3c2e953478f2f373c5a1873dee820e0ced
Deleted: sha256:b057ab380990c219581e3b074919413ebe31079cbd0d615f63872c471b4dc633
[root@kylin ~]#
댓글
댓글 쓰기