Docker – docker Commands

List of useful Docker commands :

1. docker ps : to list the running containers

2. docker ps -a : to list all the containers even the terminated ones

3. docker images : to find the images installed

4. Remove an image:
docker rmi ImageID1 ImageID2

5. docker stop id : to stop the image from running

6. docker inspect imagename

7. docker inspect containerName : (return a payload json)

8. docker exec -ti containerid /bin/bash : this is used to go inside the container

9. docker logs containerid

10. docker rm containerid : to remove a stopped container

11. docker rm $(docker ps -a -q)

12. systemctl start docker : to start the docker daemon

13. systemctl stop docker : stop the docker daemon

14. docker network create network-name

15. restart docker container
docker restart container-id/name

Summary

In this tutorial we learnt few other commands which are very useful in docker.

We hope you enjoyed learning this.


Leave a Comment