Docker DCA Practice Test - Questions Answers, Page 18
List of questions
Question 171
The following Docker Compose file is deployed as a stack:
Is this statement correct about this health check definition?
Solution: Health checks test for app health five seconds apart. If the test fails, the container will be restarted three times before it gets rescheduled.
Question 172
An application image runs in multiple environments, with each environment using different certificates and ports. Is this a way to provision configuration to containers at runtime?
Solution: Create a Dockerfile for each environment, specifying ports and ENV variables for certificates.
Question 173
Can this set of commands identify the published port(s) for a container?
Solution: 'docker network inspect', 'docker port'
Question 174
In Docker Trusted Registry, is this how a user can prevent an image, such as 'nginx:latest', from being overwritten by another user with push access to the repository?
Solution: Remove push access from all other users.
Question 175
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 container on the bridge network.
Question 176
Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution: cgroups
Question 177
Will this configuration achieve fault tolerance for managers in a swarm?
Solution: one manager node for two worker nodes
Question 178
The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this trafftc?
Solution. a request issued from a pod bearing the tier: api label, to a pod bearing the tier: backend label
Question 179
The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this trafftc?
Solution. a request issued from a pod bearing only the tier: frontend label, to a pod bearing the tier: backend label
Question 180
You want to create a container that is reachable from its host's network.
Does this action accomplish this?
Solution. Use network connect to access the container on the bridge network.
Question