docker Flashcards
learn about docker
1
Q
how to you check docker version
A
docker -v
2
Q
What is the command docker ps
A
It checks if a conntainers are running
3
Q
How do you check an image
A
type docker images
4
Q
What is a dockerfile?
A
simple text file which contains instructions to build an image.
5
Q
What is the difference between run and cmd in dockerfile?
A
Run executes during building.
CMD executes only when you create a container out of the image.
6
Q
what command used to build image
A
docker build -t
7
Q
how do you give image name
A
use imageName:tageName “location of Dockerfile”
8
Q
What is the purpose of compose in Docker
A
With docker compose you can run multiple containers networked with each other at once.
This is done through yaml file using command
docker-compose.yml