docker Flashcards

learn about docker

1
Q

how to you check docker version

A

docker -v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the command docker ps

A

It checks if a conntainers are running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you check an image

A

type docker images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a dockerfile?

A

simple text file which contains instructions to build an image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what command used to build image

A

docker build -t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how do you give image name

A

use imageName:tageName “location of Dockerfile”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly