lab 11 Flashcards

1
Q

What command is used to stop a container session?

docker stop MyContainer.
docker end MyContainer
docker exit MyContainer
docker quit MyContainer.

A

docker stop MyContainer.

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

How do you build a new image based on the Dockerfile in the current directory?

docker ps -a
docker images
docker run -it –name MyContainer my-dummy-image
docker build -t my-dummy-image .

A

docker build -t my-dummy-image .

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

What command lists all available Docker images?

docker stop MyContainer
docker images
docker ps -a
docker start MyContainer

A

docker images

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

How do you start a container session for ‘MyContainer’?

docker exec -it MyContainer powershell
docker start MyContainer
docker run -it –name MyContainer my-dummy-image
docker stop MyContainer

A

docker start MyContainer

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

How do you specify a local image for building a container?

Include the tag listed by the docker images command
Include the tag :local after the image name
Include the tag :latest after the image name
Include the full path to the image file in the command

A

Include the tag listed by the docker images command

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