using docker(# delete containers images)
docker에 설치된 images container 삭제
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9dde9553ec15 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 49 minutes ago Up 49 minutes hadoop-slave2
8eb410685505 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 49 minutes ago Up 49 minutes hadoop-slave1
e6188acca7ea kiwenlau/hadoop:1.0 "sh -c 'service ss..." 49 minutes ago Up 49 minutes 0.0.0.0:8088->8088/tcp, 0.0.0.0:50070->50070/tcp hadoop-master
546c2d4a41fb hadoop1 "/bin/bash" 47 hours ago Up 47 hours hello2
a9bb5aa82130 hadoop1 "/bin/bash" 2 days ago Exited (1) 2 minutes ago hello
[root@kylin ~]#
1. 환경준비
centos 7.6
docker
docker
2.backup container
[root@kylin ~]# docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9dde9553ec15 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 49 minutes ago Up 49 minutes hadoop-slave2
8eb410685505 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 49 minutes ago Up 49 minutes hadoop-slave1
e6188acca7ea kiwenlau/hadoop:1.0 "sh -c 'service ss..." 49 minutes ago Up 49 minutes 0.0.0.0:8088->8088/tcp, 0.0.0.0:50070->50070/tcp hadoop-master
546c2d4a41fb hadoop1 "/bin/bash" 47 hours ago Up 47 hours hello2
a9bb5aa82130 hadoop1 "/bin/bash" 2 days ago Exited (1) 2 minutes ago hello
[root@kylin ~]#
[root@kylin ~]# docker container stop 546c2d4a41fb
546c2d4a41fb
[root@kylin ~]#
[root@kylin ~]# docker container rm 546c2d4a41fb
546c2d4a41fb
[root@kylin ~]#
[root@kylin ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9dde9553ec15 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 52 minutes ago Up 52 minutes hadoop-slave2
8eb410685505 kiwenlau/hadoop:1.0 "sh -c 'service ss..." 52 minutes ago Up 52 minutes hadoop-slave1
e6188acca7ea kiwenlau/hadoop:1.0 "sh -c 'service ss..." 52 minutes ago Up 52 minutes 0.0.0.0:8088->8088/tcp, 0.0.0.0:50070->50070/tcp hadoop-master
[root@kylin ~]#
댓글
댓글 쓰기