exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 282 discussion

Actual exam question from CompTIA's XK0-005
Question #: 282
Topic #: 1
[All XK0-005 Questions]

A Linux administrator needs to expose port 9000 for a container to listen during runtime. The Linux administrator creates a Dockerfile with the following entries.

# Test-Container

FROM node:9-alpine -

WORDDIR /usr/src/app -
COPY package*.json ./

RUN npm install -
copy . .

EXPOSE 9000 -
CMD ['npm", "start"]

Which of the following commands should the administrator use to accomplish this task? (Choose two).

  • A. docker build -t Test-Container
  • B. docker tag Test-Container
  • C. docker inspect Test-Container
  • D. docker run -p 9000:80 Test-Container
  • E. docker push Test-Container
  • F. docker run -p 80:9000 Test-Container
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️

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
Mistermiyagi
3 weeks ago
Selected Answer: AF
I believe given answers are incorrect here. Should be AF due to the dockerfile defines the application to listen on port 9000 which should be 80:9000 Host:container Not 9000:80 Host:container
upvoted 1 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