0% found this document useful (0 votes)
2 views2 pages

Docker Vol, Con & Network Delete

The document details a series of Docker commands executed in a terminal session. It includes listing running containers, stopping and removing them, checking network configurations, and pruning unused networks and volumes. Ultimately, all containers and volumes are removed, leaving the Docker environment clean.

Uploaded by

KSabari Nath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Docker Vol, Con & Network Delete

The document details a series of Docker commands executed in a terminal session. It includes listing running containers, stopping and removing them, checking network configurations, and pruning unused networks and volumes. Ultimately, all containers and volumes are removed, leaving the Docker environment clean.

Uploaded by

KSabari Nath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ubuntu@ip-172-31-21-156:~$ docker container ls

CONTAINER ID IMAGE COMMAND CREATED


STATUS PORTS NAMES
f7957ef8ff03 learnitguide/busapp "docker-entrypoint.s…" 13 minutes
ago Up 13 minutes con21
2cb72c193522 httpd "httpd-foreground" 40 minutes
ago Up 40 minutes 0.0.0.0:450->80/tcp, [::]:450->80/tcp con1

ubuntu@ip-172-31-21-156:~$ docker stop $(docker ps -aq) && docker rm $


(docker ps -aq)
f7957ef8ff03
2cb72c193522
58ebe2f31a32
f7957ef8ff03
2cb72c193522
58ebe2f31a32

ubuntu@ip-172-31-21-156:~$ docker container ls


CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

ubuntu@ip-172-31-21-156:~$ docker network ls


NETWORK ID NAME DRIVER SCOPE
b7e5a75e15b0 bridge bridge local
986355a8b7cc host host local
bdaea07bcb32 my_hhh_Network bridge local
e82584d01e8d my_sathish_network bridge local
a9d25b5e4f2f none null local

ubuntu@ip-172-31-21-156:~$ docker rm network


Error response from daemon: No such container: network

ubuntu@ip-172-31-21-156:~$ docker network ls


NETWORK ID NAME DRIVER SCOPE
b7e5a75e15b0 bridge bridge local
986355a8b7cc host host local
bdaea07bcb32 my_hhh_Network bridge local
e82584d01e8d my_sathish_network bridge local
a9d25b5e4f2f none null local

ubuntu@ip-172-31-21-156:~$ docker network prune


WARNING! This will remove all custom networks not used by at least one
container.
Are you sure you want to continue? [y/N] y
Deleted Networks:
my_hhh_Network
my_sathish_network

ubuntu@ip-172-31-21-156:~$ docker volume prune


WARNING! This will remove anonymous local volumes not used by at least
one container.
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B

ubuntu@ip-172-31-21-156:~$ docker volume ls


DRIVER VOLUME NAME
local Mla
local Tesla
local data_vol

ubuntu@ip-172-31-21-156:~$ docker volume rm $(docker volume ls -q)


Mla
Tesla
data_vol

ubuntu@ip-172-31-21-156:~$ docker volume ls


DRIVER VOLUME NAME

ubuntu@ip-172-31-21-156:~$ ^C
ubuntu@ip-172-31-21-156:~$

You might also like