DevOps Shack - 200 Scenario-Based Docker Interview Ques
DevOps Shack - 200 Scenario-Based Docker Interview Ques
1.
What is Docker, and how does it differ from a
virtual machine?
2.
What are the main components of Docker?
3.
What is the difference between Docker Image and
Container?
4.
What happens when you run docker run nginx?
5.
How do you list all running and stopped containers?
6.
What is a Dockerfile, and why is it used?
7.
What is the difference between COPY and ADD in
Dockerfile?
8.
How do you build an image from a Dockerfile?
9.
How do you reduce the Docker image size?
○ docker-compose up -d (start)
○ docker-compose down (stop)
○ docker-compose up -d --build
Modify daemon.:
{
"log-level": "debug"
○ curl http://localhost:5000/v2/_catalog
○ docker stats
○ Use --network=none
○ docker stats
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
placement:
Restore with:
docker run --rm -v myvolume:/data -v $(pwd):/backup
busybox tar xvf /backup/data.tar -C /data