{"id":81849,"date":"2022-04-13T03:05:10","date_gmt":"2022-04-13T08:35:10","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=81849"},"modified":"2024-01-16T02:43:33","modified_gmt":"2024-01-16T08:13:33","slug":"docker-certified-associate-exam-questions","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/","title":{"rendered":"25 Free Questions on Docker Certified Associate Exam"},"content":{"rendered":"<p>If you are looking for <a href=\"https:\/\/www.whizlabs.com\/docker-certified-associate\/\">Docker Certified Associate Exam<\/a> sample questions, then this article helps a lot in your exam preparation. Docker certification is designed for beginners who are new to the concept of containers. Docker is a platform that helps build different containers. This certification exam assesses your docker skills and recognizes you as an industry-acceptable docker certified associate.<\/p>\n<p>By going through these free docker certification questions, you will gain more confidence in facing the actual exam. The detailed explanation for docker questions and answers makes you aware of the important objectives of the real exam.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Orchestration\" >Domain : Orchestration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Orchestration-2\" >Domain : Orchestration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Orchestration-3\" >Domain : Orchestration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Image_Creation_Management_and_Registry\" >Domain : Image Creation, Management, and Registry<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Image_Creation_Management_and_Registry-2\" >Domain : Image Creation, Management, and Registry<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Image_Creation_Management_and_Registry-3\" >Domain : Image Creation, Management, and Registry<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Installation_and_Configuration\" >Domain : Installation and Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Installation_and_Configuration-2\" >Domain : Installation and Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Networking\" >Domain : Networking<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Security\" >Domain : Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Security-2\" >Domain : Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Storage_and_Volumes\" >Domain : Storage and Volumes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Orchestration-4\" >Domain : Orchestration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Orchestration-5\" >Domain : Orchestration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Orchestration-6\" >Domain : Orchestration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Image_Creation_Management_and_Registry-4\" >Domain : Image Creation, Management, and Registry<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Image_Creation_Management_and_Registry-5\" >Domain : Image Creation, Management, and Registry<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Image_Creation_Management_and_Registry-6\" >Domain : Image Creation, Management, and Registry<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Installation_and_Configuration-3\" >Domain : Installation and Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Installation_and_Configuration-4\" >Domain : Installation and Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Networking-2\" >Domain : Networking<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Networking-3\" >Domain : Networking<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Security-3\" >Domain : Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Security-4\" >Domain : Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Domain_Storage_and_Volumes-2\" >Domain : Storage and Volumes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.whizlabs.com\/blog\/docker-certified-associate-exam-questions\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Orchestration\"><\/span><span style=\"font-weight: 400;\">Domain : Orchestration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q1 : A global service is a service that runs\u00a0 ____\u00a0 task\/tasks on every node that meet the placement and resource constraints<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Many<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>One<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>more than one<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>None<\/span><\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is correct<\/b><br \/>\n<b>Option C is incorrect<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><b>Reference:<\/b><a href=\"https:\/\/docs.docker.com\/engine\/swarm\/services\/#replicated-or-global-services\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/swarm\/services\/#replicated-or-global-services<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Orchestration-2\"><\/span><span style=\"font-weight: 400;\">Domain : Orchestration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q2 : Your company needs to run a custom monitoring application published in Docker Hub called &#8220;examplecorp\/stats-collector&#8221;. You must ensure this would run in all swarm nodes, regardless how many nodes you currently have or if a new one would join the swarm eventually. This monitoring system requires an environment variable called ENDPOINT_ADDRESS that sends the metrics to an external service hosted at &#8216;service.example.com&#8217;. Which of the following commands would accomplish these requirements?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>docker service create &#8211;name stats-collector &#8211;replicas=1 &#8211;entrypoint ADDRESS=&#8221;service.example.com&#8221; examplecorp\/stats-collector<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>docker service create &#8211;name stats-collector &#8211;replicas=auto &#8211;entrypoint ADDRESS=&#8221;service.example.com&#8221; examplecorp\/stats-collector<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>docker service create &#8211;name stats-collector &#8211;mode=global -e ENDPOINT_ADDRESS=&#8221;service.example.com&#8221; examplecorp\/stats-collector<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>docker service create &#8211;name stats-collector &#8211;mode=replicated -e ENDPOINT_ADDRESS=&#8221;service.example.com&#8221; examplecorp\/stats-collector<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A is incorrect because this would only bring one task (container) up in one random node in the swarm. Another issue is that &#8211;entrypoint option would make the container to exec ADDRESS=&#8221;service.example.com&#8221;, which would make the service creation fails in the end.<\/span><\/p>\n<p><b>B is incorrect <\/b><span style=\"font-weight: 400;\">because you cannot specify &#8216;auto&#8217; as a number of replicas. It must be a number always. Another issue is that &#8211;entrypoint option would make the container to exec ADDRESS=&#8221;service.example.com&#8221;, which would make the service creation fails in the end.<\/span><br \/>\n<b>C is correct.<\/b><span style=\"font-weight: 400;\"> The service must run as &#8216;global&#8217;, because it will create one task in each swarm node, even if a new node joins the swarm. The -e is the correct option to specify a custom environment variable to the container.<\/span><br \/>\n<b>D is wrong.<\/b><span style=\"font-weight: 400;\"> Not only this is the default mode, but eventually will create just only one container in the entire swarm. The questions asks that we need to run this in all nodes. The -e is the correct option to specify a custom environment variable to the container.<\/span><\/p>\n<p><b>Reference:<\/b><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/service_create\/\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/service_create\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Orchestration-3\"><\/span><span style=\"font-weight: 400;\">Domain : Orchestration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q3 : Which of the following is NOT true regarding docker swarm mode?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>You can deploy both kinds of nodes, managers and workers, using the Docker Engine<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>For each service, you can declare the number of tasks you want to run. When you scale up or down, the swarm manager automatically adapts by adding or removing tasks to maintain the desired state.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>The swarm manager automatically assigns addresses to the containers on the overlay network when it initializes or updates the application.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Docker swarm mode is a plugin which you can install alongside docker to\u00a0 run a cluster of docker engines<\/span><\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">This is correct<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">This is correct<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">This is correct<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">a,b and c all are correct &#8211; so the only incorrect option is this.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Docker swarm mode is not a plugin. It is built into docker engine. A basic docker installation can be run in swarm mode, it doesn\u2019t require any plugin.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each node in the swarm enforces TLS mutual authentication and encryption to secure communications between itself and all other nodes <\/span><a href=\"https:\/\/docs.docker.com\/engine\/swarm\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/swarm\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Image_Creation_Management_and_Registry\"><\/span><span style=\"font-weight: 400;\">Domain : Image Creation, Management, and Registry<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q4 : Which of the following patterns would exclude all Python byte-code files from being copied during the Docker image creation process?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>**.pyc<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>**\/*.pyc<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>*.pyc<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>\/*.pyc<\/span><\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>The correct answer is Option B<\/b><\/p>\n<p><b>References:<\/b> <a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/builder<\/span><\/a>, <a href=\"https:\/\/codefresh.io\/docker-tutorial\/not-ignore-dockerignore\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/codefresh.io\/docker-tutorial\/not-ignore-dockerignore\/<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Beyond Go\u2019s filepath.Match rules, Docker also supports a special wildcard string ** that matches any number of directories (including zero). For example, **\/*.go will exclude all files that end with .go that are found in all directories, including the root of the build context.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Image_Creation_Management_and_Registry-2\"><\/span><span style=\"font-weight: 400;\">Domain : Image Creation, Management, and Registry<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q5 : Which of the following statement is correct? Pick exactly two statements.<\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Image is a collection of immutable layers whereas container is a running instance of an image.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Container can exist without the image but image cannot exist without container<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Only one container can be spawned from a given image at a time<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>If multiple containers are spawned from the same image then they all use the same copy of image in memory.<\/span><\/p>\n<p><b>Correct Answers: A and D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is correct.<\/b><span style=\"font-weight: 400;\"> Image consists of layers which are immutable. Container is a running instance of an image.<\/span><br \/>\n<b>Option B is incorrect<\/b><span style=\"font-weight: 400;\"> because containers cannot exist without an image. We can spawn a container using an image.<\/span><br \/>\n<b>Option C is incorrect <\/b><span style=\"font-weight: 400;\">because we can spawn multiple containers from a single image.<\/span><br \/>\n<b>Option D is correct <\/b><span style=\"font-weight: 400;\">because when we spawn multiple containers from a same image &#8211; only a single copy of the image is loaded on memory. Each container has its own Read and Write layer to accommodate its local changes.<\/span><\/p>\n<p><b>Reference: <\/b><a href=\"https:\/\/docs.docker.com\/glossary\/?term=image\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/glossary\/?term=image<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Image_Creation_Management_and_Registry-3\"><\/span><span style=\"font-weight: 400;\">Domain : Image Creation, Management, and Registry<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q6 : You are in a directory containing a file named Dockerfile-app. You want to build a docker image using this \u201cDockerfile-app\u201d file without renaming it to \u201cDockerfile\u201d. Which of the following answers is correct?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>docker build -d Dockerfile-app<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>docker build -f Dockerfile-app<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>docker build &#8211;dockerfile Dockerfile-app<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>docker build &#8211;from-file Dockerfile-app<\/span><\/p>\n<p><b>Correct Answer: B\u00a0<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Invalid flag.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u201c-f\u201d is a valid flag for providing Dockerfile<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Invalid flag.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Invalid flag.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Docker provides argument \u201c-f\u201d to use Dockerfile to build the image. <\/span><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/build\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/build\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Installation_and_Configuration\"><\/span><span style=\"font-weight: 400;\">Domain : Installation and Configuration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q7 : Bob did a fresh installation of docker on his new linux server. He hasn\u2019t tinkered with anything and has just installed docker packages from official repository. He runs a new container with command \u201cdocker run -d nginx\u201d , which logging driver will this container use?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Syslog<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Logentries<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Json-file<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Journald<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><span style=\"font-weight: 400;\">json-file is the default logging driver in docker<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Installation_and_Configuration-2\"><\/span><span style=\"font-weight: 400;\">Domain : Installation and Configuration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q8 : Which of the following gives a web dashboard to manage docker cluster?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Docker swarm mode<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Docker UCP<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Docker-compose<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>DTR<\/span><\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">docker swarm mode is used for creating docker cluster<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Docker UCP is the a docker enterprise software which comes bundled with a web dashboard and cli for managing docker swarm effectively.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">docker-compose is used for running\/managing docker services in single docker host.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Docker Trusted Registry (DTR) is the enterprise-grade image storage solution from Docker.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">UCP provides us with a single web based dashboard to manage\/maintain docker cluster.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Networking\"><\/span><span style=\"font-weight: 400;\">Domain : Networking<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q9 : Bob runs a container with &#8211;net=host, which of the following will NOT true? There are already multiple containers running on the host.<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>The container will use host network namespace and the network interfaces and IP stack of the host.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>All containers in the host network are able to communicate with each other on the host interfaces.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Because they are using the host networking namespace, two containers are able to bind to the same TCP port.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>From a networking standpoint this is equivalent to multiple processes running on a host without containers.<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Any two processes running on same networking namespace can\u2019t bind to the same port. This holds true for host networking namespace as well. That\u2019s why Option C is a false statement.<\/span><\/p>\n<p><b>Reference:<\/b><a href=\"https:\/\/success.docker.com\/article\/networking\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">https:\/\/success.docker.com\/article\/networking<\/span><\/a><\/p>\n<blockquote><p>Read More: <a href=\"https:\/\/www.whizlabs.com\/blog\/docker-networking-hands-on-labs\/\" target=\"_blank\" rel=\"noopener\">Docker Networking<\/a> using hands-on labs<\/p><\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Security\"><\/span><span style=\"font-weight: 400;\">Domain : Security<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q10 : Grants in UCP are made up of which of the following?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>subject, role and resource set<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>subject, role and containers<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>nodes, role and containers<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>subject, node and containers<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>E. <\/strong>images, containers and nodes<\/span><\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is correct<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is incorrect<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A grant is made up of subject, role, and resource set.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Grants define which users can access what resources in what way. Grants are effectively Access Control Lists (ACLs), and when grouped together, they provide comprehensive access policies for an entire organization.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Only an administrator can manage grants, subjects, roles, and access to resources.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Security-2\"><\/span><span style=\"font-weight: 400;\">Domain : Security<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q11 : Which of the following is <\/span><b>NOT<\/b><span style=\"font-weight: 400;\"> true about selinux ?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>SELinux= Security-Enhanced Linux<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>SELinux provides a mechanism for supporting<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Access_control\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">access control<\/span><\/a><span style=\"font-weight: 400;\"> security policies<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>SELinux comes bundled with docker<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>SELinux is a set of kernel modifications and user-space tools that have been added to various<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Linux_distribution\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">Linux distributions<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect <\/b><span style=\"font-weight: 400;\">because its a true statement<\/span><br \/>\n<b>Option B is incorrect <\/b><span style=\"font-weight: 400;\">because its a true statement<\/span><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect<\/b><span style=\"font-weight: 400;\"> because its a true statement<\/span><\/p>\n<p><span style=\"font-weight: 400;\">SELinux is independent of docker. Docker is compatible with SELinux though.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Storage_and_Volumes\"><\/span><span style=\"font-weight: 400;\">Domain : Storage and Volumes<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q12 : Bob wants to update the secret being used by one of his service. What is the correct sequence of actions to be performed by him?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Update the existing secret using docker secret update<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Update the existing secret , restart all the services using this secret<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Create a new secret, update the service to use this new secret , delete the old secret<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Create a new secret, create a new service with this new secret, delete old secret and old service<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Secrets are immutable in docker swarm. This means they cannot be modified. So if you want to make any modification to a secret then you have to create a new secret file.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Having said that, the current sequence for updating a secret is &#8211; to first create a new secret (because we can\u2019t update an existing one), attach the new secret to the service by updating the service &#8211; (this would require the service to restart &#8211; docker swarm would take care of that) and then delete the old secret.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Orchestration-4\"><\/span><span style=\"font-weight: 400;\">Domain : Orchestration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q13 : Bob is running a docker swarm cluster with multiple manager nodes. Bob needs to remove one the manager nodes from the cluster permanently. Bob has access to this manager node. What is the safest way for him to remove a manager node from the cluster?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Simply shut down the server and let the Raft quorum decides to remove it permanently from the swarm.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Run &#8220;docker swarm leave&#8221; on the specific node.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Firstly demote the manager node to a worker and then remove it using &#8220;docker swarm leave&#8221;<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Stop the docker service on this specific manager node. Wait until its status change to &#8216;Unreachable&#8217; by checking the status on another manager node. Once it disappears from the list of manager nodes, you can safely shut down this node.<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>A is incorrect<\/b><span style=\"font-weight: 400;\"> because the purpose of a raft quorum is to decide which manager node is a leader. The manager will still show as &#8216;active&#8217; in the swarm, but the manager status will be &#8216;Unreachable&#8217;<\/span><br \/>\n<b>B is incorrect<\/b><span style=\"font-weight: 400;\"> because only a worker node can leave a swarm with no restriction. If a manager node tries to leave a swarm, the command will fail because it will state you are a manager. Therefore you must demote this node to a worker so the swarm and them you can leave the swarm as a worker. If the current manager is the leader, it will successfully auto-demote itself and the raft quorum will decide which manager node will be the new leader.\u00a0\u00a0<\/span><br \/>\n<b>C is correct<\/b><span style=\"font-weight: 400;\"> because this is the correct and safest way to remove a manager from a swarm.<\/span><br \/>\n<b>D is incorrect<\/b><span style=\"font-weight: 400;\"> because the manager will still show as &#8216;active&#8217; in the swarm, but the manager status will be &#8216;Unreachable&#8217;.<\/span><\/p>\n<p><b>Reference: <\/b><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/swarm_leave\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/swarm_leave\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Orchestration-5\"><\/span><span style=\"font-weight: 400;\">Domain : Orchestration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q14 : DCT stands for?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Docker Content Transmission<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Docker Container Transmission<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Docker Certificate Trust<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Docker Content Trust<\/span><\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is incorrect<\/b><br \/>\n<b>Option D is correct<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Points regarding locking docker swarm<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Orchestration-6\"><\/span><span style=\"font-weight: 400;\">Domain : Orchestration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q15 : Which of the following options are available to run a single container?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>published port, user, log driver, restart policy<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>published port, user, log driver, placement constraints<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>published port, volume, secrets, log driver<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>volume, secrets, log driver, memory limit<\/span><\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is correct<\/b><br \/>\n<b>Option B is incorrect <\/b><span style=\"font-weight: 400;\">because we can&#8217;t specify placement constraints while running a single container. Placement constraints can be specified while running a service.<\/span><br \/>\n<b>Option C is incorrect<\/b><span style=\"font-weight: 400;\"> because we can&#8217;t specify secrets while running a single container<\/span><br \/>\n<b>Option D is incorrect<\/b><span style=\"font-weight: 400;\"> because we can&#8217;t specify secrets while running a container.<\/span><\/p>\n<p><b>SOURCE:<\/b><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/container_run\/\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/container_run\/<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Regarding to secrets, it is only available on the Docker Swarm and you cannot create a secret on a lone docker execution, only if it part of a service.<\/span><\/p>\n<p><b>SOURCE:<\/b><a href=\"https:\/\/docs.docker.com\/engine\/swarm\/secrets\/\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/swarm\/secrets\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Image_Creation_Management_and_Registry-4\"><\/span><span style=\"font-weight: 400;\">Domain : Image Creation, Management, and Registry<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q16 : Docker image consists of _____ layers each of which represents a Dockerfile instruction. The layers are stacked and each one is a delta of the changes from the previous layer.<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>read and write<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>write only<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>read only<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Movable<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect\u00a0<\/b><br \/>\n<b>Option C is correct<\/b><span style=\"font-weight: 400;\"> because all the layers involved in making an image are read only<\/span><br \/>\n<b>Option D is incorrect<\/b><span style=\"font-weight: 400;\"> because there is no such thing as \u201cmovable\u201d layers<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Image_Creation_Management_and_Registry-5\"><\/span><span style=\"font-weight: 400;\">Domain : Image Creation, Management, and Registry<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q17 : Which of the following statements is NOT TRUE about multi-stage builds?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Multi-stage builds eliminates the need of separate Dockerfiles.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Multi-stage builds helps on creation of smaller image sizes.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>You cannot select which step you want to start your build process in a multi-stage build once you defined all steps.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>With multi-stage builds, you can create images for different purposes, such as development and production.<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is true. <\/b><span style=\"font-weight: 400;\">You don&#8217;t need to maintain different Dockerfile as before.<\/span><br \/>\n<b>Option B is true. <\/b><span style=\"font-weight: 400;\">You can create an image with the sole purpose to build a binary file and one for running a binary file, without the need of the compiler nor the development files.<\/span><br \/>\n<b>Option C is wrong, <\/b><span style=\"font-weight: 400;\">because you can select a target build stage.<\/span><br \/>\n<b>Option D is correct,<\/b><span style=\"font-weight: 400;\"> because you can declare diferrent images and then select which will be your target during the build stage.<\/span><\/p>\n<p><b>Reference: <\/b><a href=\"https:\/\/docs.docker.com\/develop\/develop-images\/multistage-build\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/develop\/develop-images\/multistage-build\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Image_Creation_Management_and_Registry-6\"><\/span><span style=\"font-weight: 400;\">Domain : Image Creation, Management, and Registry<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q18 : If we don&#8217;t specify a tag then by convention which tag is pulled while running docker pull command?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Production<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Staging<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Latest<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Master<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">production tag can be manually created\/specified but it is not auto generated.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">staging tag can be manually created\/specified but it is not auto generated.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">This is the correct option. \u201clatest\u201d is the default tag.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Image versions can be specified manually but it is not auto generated.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The default tag to pull is latest. <\/span><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/pull\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/pull\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Installation_and_Configuration-3\"><\/span><span style=\"font-weight: 400;\">Domain : Installation and Configuration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q19 : What is the default location of secrets inside a Docker container?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>\/run\/secrets\/<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>\/secrets\/<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>\/var\/run\/<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>\/var\/secrets\/<\/span><\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is correct<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is incorrect<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><b>Reference: <\/b><a href=\"https:\/\/docs.docker.com\/engine\/swarm\/secrets\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/swarm\/secrets\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Installation_and_Configuration-4\"><\/span><span style=\"font-weight: 400;\">Domain : Installation and Configuration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q20 : How do you setup the default logging driver on Docker daemon to be the syslog driver?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>On \/etc\/docker\/daemon.yaml or C:\\ProgramData\\docker\\config\\daemon.yaml, just add:<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0log-driver: &#8220;syslog&#8221;<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>On \/etc\/docker\/daemon.json or C:\\ProgramData\\docker\\config\\daemon.json, just add:<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 {<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0&#8220;log-driver&#8221;: &#8220;syslog&#8221;\u00a0<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0}<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>On \/etc\/docker\/daemon.cfg or C:\\ProgramData\\docker\\config\\daemon.cfg, just add:<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 {<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 &#8220;log-driver&#8221;: &#8220;syslog&#8221;<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0}<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>On \/etc\/docker\/daemon.cfg or C:\\ProgramData\\docker\\config\\daemon.cfg, just add: log-driver: &#8220;syslog&#8221;<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>E. <\/strong>On \/etc\/docker\/daemon.conf or C:\\ProgramData\\docker\\config\\daemon.conf, just add: log-driver: &#8220;syslog&#8221;<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>F. <\/strong>On \/etc\/docker\/daemon.conf or C:\\ProgramData\\docker\\config\\daemon.conf, just add:<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 {<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0&#8220;log-driver&#8221;: &#8220;syslog&#8221;<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0}<\/span><\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Reference: <\/b><a href=\"https:\/\/docs.docker.com\/config\/containers\/logging\/configure\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/config\/containers\/logging\/configure\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Networking-2\"><\/span><span style=\"font-weight: 400;\">Domain : Networking<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q21 : Which of the following commands can be used to attach an existing network named &#8216;net1&#8217; to a container &#8216;container1&#8217; which is currently running in network named &#8216;net2&#8217;?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>docker network connect net1 net2 container1<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>docker network connect net1 container1<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>docker connect network net1 net2<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>docker connect network net1 container1<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>E. <\/strong>docker connect network net1 net2 container1<\/span><\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is correct<\/b><br \/>\n<b>Option C is incorrect<\/b><br \/>\n<b>Option D is incorrect<\/b><br \/>\n<b>Option E is incorrect<\/b><\/p>\n<p><span style=\"font-weight: 400;\">container1 is currently part of network &#8216;net2&#8217;. To connect it to &#8216;net1&#8217; we simply have to connect\/attach it with network &#8216;net1&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8216;docker network connect net1 container1&#8217; should do what we want.<\/span><\/p>\n<p><b>Reference:<\/b><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/network_connect\/#examples\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/network_connect\/#examples<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Networking-3\"><\/span><span style=\"font-weight: 400;\">Domain : Networking<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q22 : Which of the following is a valid command to assign static IP to a container?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>docker run &#8211;static-ip 172.18.0.22 &lt;image&gt;<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>docker run &#8211;ip 172.18.0.22 &lt;image&gt;<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>None of the above<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>docker run &#8211;network-ip 172.18.0.22 &lt;image&gt;<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Static IP can be allocated only on a custom network. So first you will have to create a new network<\/span><\/p>\n<p><span style=\"font-weight: 400;\">docker network create &#8211;subnet=172.18.0.0\/16 mynet123<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And then run container with static IP<\/span><\/p>\n<p><span style=\"font-weight: 400;\">docker run &#8211;net mynet123 &#8211;ip 172.18.0.22 -it ubuntu bash<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Security-3\"><\/span><span style=\"font-weight: 400;\">Domain : Security<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q23 : Bob wants to test an untrusted docker image which has a bug due to which it starts consuming memory rapidly which causes other programs on the system to run out of <\/span><\/em><em><span style=\"font-weight: 400;\">memory and crash. Bob wants to run the container and limit the max memory it can to be 512MB.<\/span><\/em><br \/>\n<em><span style=\"font-weight: 400;\">Which of the following can bob use while running a container to deal with this problem?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>docker run &#8211;limit 512m<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>docker run &#8211;limit 512<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>docker run -m 512m<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>docker run -m 512<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect <\/b><span style=\"font-weight: 400;\">because &#8211;limit is not a valid flag<\/span><br \/>\n<b>Option B is incorrect<\/b><span style=\"font-weight: 400;\"> because &#8211;limit is not a valid flag<\/span><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect <\/b><span style=\"font-weight: 400;\">because -m 512 only assigns 512 bytes but bob wants to assign 512MB<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Security-4\"><\/span><span style=\"font-weight: 400;\">Domain : Security<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q24 : What is the recommended way of dealing with loss of root in in DCT?<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>Regenerate a new root key<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Sign existing user certs with a new root key<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>Contact docker support.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Create a new DCT cluster<\/span><\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is incorrect<\/b><br \/>\n<b>Option B is incorrect<\/b><br \/>\n<b>Option C is correct<\/b><br \/>\n<b>Option D is incorrect<\/b><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Storage_and_Volumes-2\"><\/span><span style=\"font-weight: 400;\">Domain : Storage and Volumes<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em><span style=\"font-weight: 400;\">Q25 : Which of the following statements is NOT true?<\/span><\/em><br \/>\n<em><span style=\"font-weight: 400;\">By default all files created inside a container are stored on a writable container layer. This means that:<\/span><\/em><\/h4>\n<p><span style=\"font-weight: 400;\"><strong>A. <\/strong>The data persists when that container no longer exists<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>B. <\/strong>Two different containers can\u2019t share the data present in their writable layer.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>C. <\/strong>A container\u2019s writable layer is tightly coupled to the host machine where the container is running. You can\u2019t easily move the data somewhere else.<\/span><br \/>\n<span style=\"font-weight: 400;\"><strong>D. <\/strong>Writing into a container\u2019s writable layer requires a<\/span><a href=\"https:\/\/docs.docker.com\/storage\/storagedriver\/\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400;\">storage driver<\/span><\/a><span style=\"font-weight: 400;\"> to manage the filesystem.<\/span><\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p><b>Option A is correct<\/b><br \/>\n<b>Option B is incorrect<\/b><span style=\"font-weight: 400;\"> because its a true statement. Containers writable layers are separated using different mount namespaces and hence they can\u2019t share it.<\/span><br \/>\n<b>Option C is incorrect<\/b><span style=\"font-weight: 400;\"> because it\u2019s a true statement<\/span><br \/>\n<b>Option D is incorrect<\/b><span style=\"font-weight: 400;\"> because it\u2019s a true statement<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When a container is deleted &#8211; all data present in it\u2019s writable layer is also lost. To prevent this data loss we can use volumes.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>By trying these free questions and answers, you are now very clear on the core concepts of the docker certified associate certification exam. Additionally, you have to take up a few more practice tests to ensure you are 100% ready to attempt the actual exam. You can check our official web page to try out the practice tests and a step-by-step video course. Keep Learning !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking for Docker Certified Associate Exam sample questions, then this article helps a lot in your exam preparation. Docker certification is designed for beginners who are new to the concept of containers. Docker is a platform that helps build different containers. This certification exam assesses your docker skills and recognizes you as an industry-acceptable docker certified associate. By going through these free docker certification questions, you will gain more confidence in facing the actual exam. The detailed explanation for docker questions and answers makes you aware of the important objectives of the real exam. Domain : Orchestration [&hellip;]<\/p>\n","protected":false},"author":359,"featured_media":82084,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1862],"tags":[1864],"class_list":["post-81849","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-docker-certified-associate-exam"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1-150x150.webp",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1-300x158.webp",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1-250x250.webp",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/04\/Free-Questions-on-Docker-Certified-Associate-Certification-Exam-1.webp",150,79,false]},"uagb_author_info":{"display_name":"Abilesh Premkumar","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/abilesh\/"},"uagb_comment_info":30,"uagb_excerpt":"If you are looking for Docker Certified Associate Exam sample questions, then this article helps a lot in your exam preparation. Docker certification is designed for beginners who are new to the concept of containers. Docker is a platform that helps build different containers. This certification exam assesses your docker skills and recognizes you as&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/81849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/359"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=81849"}],"version-history":[{"count":6,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/81849\/revisions"}],"predecessor-version":[{"id":92955,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/81849\/revisions\/92955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/82084"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=81849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=81849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=81849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}