exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 82 discussion

Actual exam question from Cisco's 350-901
Question #: 82
Topic #: 1
[All 350-901 Questions]

DRAG DROP -

Refer to the exhibit. Drag and drop the correct parts of the Dockerfile from the left onto the item numbers on the right that match the missing sections in the exhibit to complete the Dockerfile to successfully build and deploy a container running a Python application. Not all parts of the Dockerfile are used.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
FR99
Highly Voted 3 years, 2 months ago
Agree, correct answer is: FROM python:3.6-alpine COPY . . RUN pip install -r requirements.txt EXPOSE 5001 CMD ["python", "app.py"]
upvoted 43 times
CertifiedGoogler
3 years ago
I agree, This is the correct answer
upvoted 2 times
...
...
Teringzooi
Most Recent 1 year, 1 month ago
Answer is correct: FROM python:3.6-alpine COPY . . RUN pip install -r requirements.txt EXPOSE 5001 CMD ["python", "app.py"]
upvoted 1 times
...
designated
1 year, 2 months ago
Yeah, the correct answer is: FROM python:3.6-alpine COPY . . RUN pip install -r requirements.txt EXPOSE 5001 CMD ["python", "app.py"]
upvoted 2 times
designated
1 year, 2 months ago
## Dockerfiles ## - FROM - Selects the base image used to start the build process or can be set to scratch to build a totally new image - MAINTAINER - Lets you select a name and email address for the image creator - RUN - Create image layers and executes commands within a container - CMD - Executes a single command within a container. Only one can exist in a Dockerfile. - WORKDIR - Sets the path where the command defined with CMD is to be executed - ENTRYPOINT - Executes a default application every time a container is created with the image - LABEL - Provides a label to identify the created Docker image - ADD - Copies the files from the local host or remotely via a URL into the container's file system - ENV - Sets environment variables within the container - EXPOSE - Associates a specific port for networking binding - USER - Sets the UID (or username) of the user that is to run the container - VOLUME - Sets up a sharable directory that can be mapped to a local host directory - COPY - Copies new files or directories from <src> and adds them to the filesystem of the container at the path <dest>.
upvoted 1 times
...
...
wunderup
3 years, 5 months ago
Item 2, it's hard to understand why COPY is used here. Nothing is copied?
upvoted 1 times
Writer
3 years, 5 months ago
I think the three ... means some content hence the COPY
upvoted 1 times
...
Requium
3 years, 3 months ago
The two . . means copy from the client current directory to the home directory on the docker
upvoted 3 times
...
fb48
10 months ago
at least the requirements.txt is copied
upvoted 1 times
...
...
newtoaws
3 years, 5 months ago
Answer from the site is correct
upvoted 4 times
...
newtoaws
3 years, 5 months ago
FROM has to be the first command, but I am not sure if COPY is correct here
upvoted 2 times
...
sany4o
3 years, 5 months ago
RUN and FROM, swap
upvoted 1 times
wunderup
3 years, 5 months ago
You are wrong: FROM python3.6-alpine RUN pip install -r requirement.txt
upvoted 8 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago