Docker-201 Flashcards

1
Q

Where can we find the Linux logs

A

/var/log

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

How to build the DockerFile?

A

docker build -t image_name .

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

How to run the Docker Image ?

A

docker run -p 8080:8080 -t -i -v srcfolder:dest_folder image_name

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

How can I log in to the Image ?

A

docker exec -i -t image_id sh

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

How can I run the image with sleep and -d , so that we will get the imageid

A

docker run -i -t -d -v src:dest image_name sleep 3600( -d is imp)

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

How to see all containers?

A

docker ps

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

How to stop Docker container

A

docker stop container_id

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

How to remove docker container?

A

docker rm container_id –force

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

How to create jar of image?

A

docker save busybox > busybox.tar

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