Will this command ensure that overlay traffic between service tasks is encrypted?Solution: docker service create --network --secure
Answer(s): B
: = The command docker service create --network --secure will not ensure that overlay traffic between service tasks is encrypted. This is because the --secure option is not a valid option for the docker service create command. To ensure that overlay traffic between service tasks is encrypted, you need to use the --opt encrypted option when creating the overlay network with the docker network create command. For example, to create an encrypted overlay network named my-net, you can use the following command:docker network create --driver overlay --opt encrypted my-netThen, you can use the --network my-net option when creating the service with the docker service create command. For example, to create a service named my-service using the nginx image and the my-net network, you can use the following command:docker service create --name my-service --network my-net nginx
docker service create | Docker DocsUse overlay networks | Docker DocsCreate a service | Docker Docs
Will this command ensure that overlay traffic between service tasks is encrypted?Solution: docker service create --network --encrypted
= The command docker service create --network --encrypted will not ensure that overlay traffic between service tasks is encrypted. This is because the --network flag requires an argument that specifies the name or ID of the network to connect the service to. The --encrypted flag is not a valid option for docker service create. To encrypt overlay traffic between service tasks, you need to use the --opt encrypted flag on docker network create when you create the overlay network. For example:docker network create --opt encrypted --driver overlay my-encrypted-networkThen, you can use the --network flag on docker service create to connect the service to the encrypted network. For example:docker service create --network my-encrypted-network my-service
docker service create | Docker Documentation docker service create | Docker DocumentationManage swarm service networks | Docker DocsI hope this helps you understand the command and the encryption, and how they work with Docker and swarm. If you have any other questions related to Docker, please feel free to ask me.
You want to create a container that is reachable from its host's network. Does this action accomplish this?Solution: Use --link to access the container on the bridge network.
= The action of using --link to access the container on the bridge network does not accomplish the goal of creating a container that is reachable from its host's network. The --link option allows you to connect containers that are running on the same network, but it does not expose the container's ports to the host. To create a container that is reachable from its host's network, you need to use the --network host option, which attaches the container to the host's network stack and makes it share the host's IP address. Alternatively, you can use the --publish or -p option to map the container's ports to the host's ports.
: Legacy container links | Docker Documentation : Networking using the host network | Docker Documentation : docker run reference | Docker Documentation
You want to create a container that is reachable from its host's network. Does this action accomplish this?Solution: Use either EXPOSE or --publish to access the containers on the bridge network
The answer depends on whether you want to access the container from the host's network or from other containers on the same network. EXPOSE and --publish have different effects on the container's port visibility.
Docker run reference, Dockerfile reference, Docker networking overview
You want to create a container that is reachable from its host's network. Does this action accomplish this?Solution: Use network attach to access the containers on the bridge network
= (Please check the official Docker site for the comprehensive explanation)
(Some possible references from the web search results are)25 Free Questions on Docker Certified Associate Exam - WhizlabsPractice Questions for Docker Certified Associate (DCA) Exam - MediumPractice Exams (3 Sets) - Docker Certified Associate (DCA) - UdemyDocker Certified Associate Practice Exam | +600 exam quizz - UdemyDocker Certified Associate DCA Practice Exam | UPDATED 2023 - UdemyI hope this helps you in your exam preparation. Good luck!
Post your Comments and Discuss Docker DCA exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the DCA content, but please register or login to continue.