Home DevOps How To Remove Docker Image & Container In Linux

How To Remove Docker Image & Container In Linux

0
301
Docker removed container

How To Remove Docker Image & Container

How To Remove Docker, I’m having some docker images downloaded from the docker hub & I will delete images & container on the server. you can remove docker unused images by force using the name.

Check Out: Find IpAddress of a container

Let’s Begin

docker images

How To Remove Docker

I have already created a MySQL container if you don’t know how to create a container check it out Create Container here.

docker ps

 docker remove unused images

Check Out: Create Apache Docker Image Using Docker file

Here are two containers running, I will remove MySQL container here, first, you will have to stop the to container before deleting it.

Remove Container

docker stop 78e701a98334

As you can see I have stopped the container & checked the running container & delete it with Container ID as shown in below figure

Now See there is only one container running,

Check Out: How To Mount Volume To Apache Container In Docker

Remove Container Images

Here I have deleted the image of MySQL,

docker rmi 8b6ff3f79840

As you can see after deleting the image of MySQL. There is no MySQL image available.

YouTube Link: Remove Docker Images

That’s it. Docker remove images force by name unused

Leave a Reply

avatar
  Subscribe  
Notify of