304 North Cardinal St.
Dorchester Center, MA 02124
Whether you are a DevOps beginner or just a developer who wants to start working with containers, you’re in the right place. Docker is an in-demand technology that you will be exposed to frequently while on the job.
Docker is used for setting up, deploying, and running applications, at scale, by containerizing them. More on that later. Docker also provides developers with a consistent environment for product development, and along with Kubernetes, makes managing the development lifecycle a breeze.
In this course, you will learn the fundamentals of Docker such as containers, images, and commands. You’ll then progress to more advanced concepts like connecting to a database container and how to simplify workflows with Docker Compose. At the end, you’ll learn how to monitor clusters and scale Docker services with Swarm.
Q1. How do you map a host port to the container port?
Q2. Which keyword is used to set environment variables in Dockerfile?
Q3. Select all the commands used to see logs of the container.
Q4. What is the use of
lsof -i TCP:5000 command?
docker build . command, what does
. stands for?
.means current directory.
Q1. Where is the list of the current reachable hosts/containers to a container located?
docker inspect <network ID>command output
docker inspect <container-id>command output.
Q2. What is the drawback of default bridge network?
Q3. How to pass environment varibles while creating a container from prebuilt Image?
-eoption while creating a docker container.
Q4. What command is used to check details of a network?
docker network --info <network-id>
docker network ls
docker inspect <networkID>
Q5. What is the use of docker-compose?
Q1. Select all the options which can be used to provide environment variables to a container in docker-compose.yml file.
Q2. How to run docker-compose in detached mode or in the background?
docker-compose run --backgroundcommand.
Q3. Which commands can be used insted of
Q4. How to specify location of Dockerfile in case of multiple Dockerfiles or to use Dockerfile located in different location?
dockerfileoption and provide absolute path to the dockerfile.
Q1. Select all the options which applies to the Docker Swarm
Q2. Which type of docker network is used to establish communication between different services?
Q3. What is the right command to scale down a service running with 6 containers to 3 containers?
docker service <service_id> scale down 3
docker service scale <service_id>=3
docker services scale <service_id>=3
docker service <service_id> scale=3
Q4. How to list all the running containers or tasks of a stack?
docker stack ls
docker stack ps <stack_name>
docker stack services ps
Q5. Can you use
build keyword in docker-compose.yml file while working on a swarm node?
I hope this Working with Containers: Docker & Docker Compose Educative Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
More Coding Solutions >>