lab 11 Flashcards
What command is used to stop a container session?
docker stop MyContainer.
docker end MyContainer
docker exit MyContainer
docker quit MyContainer.
docker stop MyContainer.
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 .
docker build -t my-dummy-image .
What command lists all available Docker images?
docker stop MyContainer
docker images
docker ps -a
docker start MyContainer
docker images
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
docker start MyContainer
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
Include the tag listed by the docker images command