adalyn.app Explore Community
Other
Share code
Docker Basics and Commands

The most essential knowledge and commands for using Docker

#docker

Preview (10 cards)

How do you list all networks?

docker network ls

How do you remove a container and its volumes?

docker rm -v <container_id>

How do you remove all unused images?

docker image prune

How do you list view the logs of a container in real time?

docker logs -f <container_id>

How do you see the details of a specific container?

docker inspect <container_id>

How do you run a command in a running container?

docker exec -it <container_id> <command>

How do you see the details of a specific image?

docker inspect <image_id>

How do you attach a terminal to a running container?

docker attach <container_id>

Why are containers beneficial?

They isolate apps, enhance security, provide portability and run many on one host.

How do you remove a volume?

docker volume rm <volume_id>

Ready to master this source?

Import this source into your Adalyn library to start learning with spaced repetition.