QuestionQ28Verified/DevOps AutomationCopy linkReport a problemAsk AstroTutorSave questionWhich of the following statements is INCORRECT regarding a Dockerfile?AWORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT instructions and not for COPY and ADD instructions in the Dockerfile.BAn ENV instruction sets the environment value to the key, and it is available for the subsequent build steps and in the running container as well.CThe RUN instruction will execute any commands in a new layer on top of the current image and commit the results.DIf CMD instruction provides default arguments for the ENTRYPOINT instruction, both should be specified in JSON format.Show AnswerAnswerExplanationWORKDIR sets the working directory for subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions. It therefore does apply to COPY and ADD destination paths when they are relative.Learn moreDockerfile referenceShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion