{"id":500,"date":"2022-02-05T18:31:23","date_gmt":"2022-02-05T18:31:23","guid":{"rendered":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/aws-devops-engineer-professional-dop-c01-question488\/"},"modified":"2022-02-05T18:31:23","modified_gmt":"2022-02-05T18:31:23","slug":"aws-devops-engineer-professional-dop-c01-question488","status":"publish","type":"post","link":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/aws-devops-engineer-professional-dop-c01-question488\/","title":{"rendered":"AWS DevOps Engineer Professional DOP-C01 &#8211; Question488"},"content":{"rendered":"<div class=\"question\">When building a Docker image, you are searching through a persistent data volume&#039;s logs to provide parameters for the next build. You execute the following command. Which of the operations will cause a failure of the Docker RUNcommand? RUN cat .\/data\/log\/*.error | grep service_status | grep ERROR<br \/><strong><br \/>A.<\/strong> the first grep command<br \/><strong>B.<\/strong> any one of them<br \/><strong>C.<\/strong> the second grep command<br \/><strong>D.<\/strong> the cat command<\/div>\n<p><\/p>\n<style> .hidden-div{ display:none } <\/style>\n<p>\t\t\t\t\t\t\t<button onclick=\"getElementById('hidden-div').style.display = 'block'\"> Show Answer <\/button> <button onclick=\"getElementById('hidden-div').style.display = 'none'\">Hide Answer<\/button><\/p>\n<div class=\"hidden-div\" id=\"hidden-div\"><span style=\"\"><\/p>\n<div class=\"answer\">Correct Answer: <strong>C<\/strong><\/div>\n<p><strong>Explanation:<\/strong> <\/p>\n<div class=\"explanation\">\nExplanation:<br \/>\nSome RUN commands depend on the ability to pipe the output of one command into another, using the pipe character (|), as in the following example:<br \/>\nRUN wget -O &#8211; <a href=\"https:\/\/some.site\" title=\"External link\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/some.site<\/a> | wc -l > \/number<br \/>\nDocker executes these commands using the \/bin\/sh -c interpreter, which only evaluates the exit code of the last operation in the pipe to determine success. In the example above this build step succeeds and produces a new image so long as the wc -lcommand succeeds, even if the wget command fails.<br \/>\nReference:<br \/>\n<a href=\"https:\/\/docs.docker.com\/engine\/userguide\/eng-image\/dockerfile_best-practices\/#run\" title=\"External link\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/docs.docker.com\/engine\/userguide\/eng-image\/dockerfile_best-&#8230;<\/a><\/div>\n<p><\/strong><\/span> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>When building a Docker image, you are searching through a persistent data volume&#039;s logs to provide parameters for the next build. You execute the following command. Which of the operations will cause a failure of the Docker RUNcommand? RUN cat .\/data\/log\/*.error | grep service_status | grep ERRORA. the first grep commandB. any one of themC. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3,491],"class_list":["post-500","post","type-post","status-publish","format-standard","hentry","category-aws-devops-engineer-professional-dop-c01","tag-aws-devops-engineer-professional-dop-c01","tag-question-488"],"_links":{"self":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/posts\/500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/comments?post=500"}],"version-history":[{"count":0,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/posts\/500\/revisions"}],"wp:attachment":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/media?parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/categories?post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/tags?post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}