Docker – Useful commands reference


docker –version

docker image ls

docker container ls

docker run –interactive –tty ubuntu bash

docker container ls –all

Kill running containers: docker kill $(docker ps -q)

    1. Delete all stopped containers: docker rm $(docker ps -a -q)
      1. delete all images: docker rmi $(docker images -q)
      2. Force delete all containers: docker rm -f $(docker ps -a -q)
      3. Force delete all Images: docker rmi -f $(docker images -q)

Add/remove network adapter to centos docker

Create: docker network create –subnet= docker_manu

Assign: docker run –net docker_manu –ip -it ubuntu bash

Remove: docker network rm docker_manu

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Leave a Reply

Your email address will not be published. Required fields are marked *