Valid XK0-005 Dumps shared by ExamDiscuss.com for Helping Passing XK0-005 Exam! ExamDiscuss.com now offer the newest XK0-005 exam dumps, the ExamDiscuss.com XK0-005 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com XK0-005 dumps with Test Engine here:
An application developer received a file with the following content: ##This is a sample Image ## FROM ubuntu:18.04 MAINTAINER [email protected] COPY . /app RUN make /app CMD python /app/app.py RUN apt-get update RUN apt-get install -y nginx CMD ["echo","Image created"] The developer must use this information to create a test bed environment and identify the image (myimage) as the first version for testing a new application before moving it to production. Which of the following commands will accomplish this task?
Correct Answer: A
The docker build command is used to build an image from a Dockerfile and a context1. The Dockerfile is a text file that contains the instructions for creating the image, and the context is a set of files that can be used in the image creation process1. The file that the developer received is an example of a Dockerfile. The -t option is used to specify a name and an optional tag for the image1. The name and tag are separated by a colon (:), and the tag is usually used to indicate the version of the image2. For example, -t myimage:1.0 means that the image will be named myimage and tagged as 1.0. The last argument of the docker build command is the path to the context, which can be a local directory or a URL1. The dot (.) means that the current working directory is the context2. Therefore, docker build -t myimage:1.0 . means that the image will be built from the Dockerfile and the files in the current working directory, and it will be named myimage and tagged as 1.0.