exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 282 discussion

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

Which two commands download and execute an Apache web server container in Docker with a port binding 8080 in the container to 80 on the host? (Choose two.)

  • A. docker pull apache
  • B. docker run –p 8080:80 httpd
  • C. docker run –p 80:8080 httpd
  • D. docker pull httpd
  • E. docker pull https
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

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
chris_edwards
Highly Voted 1 year, 10 months ago
Selected Answer: CD
To download and run an Apache web server container in Docker with a port binding of 8080 in the container to port 80 on the host, you can use the following two commands: 1. docker pull httpd:latest - This command will download the latest version of the Apache web server Docker image from the Docker Hub. 2. docker run -p 80:8080 -d httpd - This command will start a new container based on the httpd image, with a port binding of 8080 in the container to port 80 on the host. The -d flag runs the container in detached mode, meaning it will run in the background and not block the terminal.
upvoted 5 times
...
nospampls
Highly Voted 1 year, 9 months ago
Selected Answer: CD
https://www.youtube.com/watch?v=6by0pCRQdsI -p host:container
upvoted 5 times
nospampls
1 year, 9 months ago
https://docs.docker.com/engine/reference/run/#expose-incoming-ports
upvoted 1 times
...
...
kymoni
Most Recent 6 months, 4 weeks ago
Selected Answer: CD
"a port binding 8080 in the container to 80 on the host" Docker documentation specifies the order "-p host:container" C and D are correct
upvoted 1 times
...
louisvuitton12
9 months, 2 weeks ago
Selected Answer: BD
B and D period
upvoted 1 times
...
osamodas
1 year, 1 month ago
Selected Answer: AB
To download and execute an Apache web server container in Docker with a port binding where port 8080 in the container is mapped to port 80 on the host, you need to use the docker pull command to pull the Apache image and the docker run command to start the container with the appropriate port mapping. Here are the two commands to achieve this: Download the Apache image: A. docker pull httpd This command pulls the Apache HTTP Server image (httpd) from the Docker Hub. Execute the Apache container with port mapping: B. docker run -p 8080:80 httpd This command runs the Apache container with port 8080 on the host mapped to port 80 in the container. The -p option specifies the port mapping. So, options B and D are the correct commands for downloading and executing an Apache web server container with the specified port binding.
upvoted 2 times
...
ymmit78
1 year, 1 month ago
"-p=[] : Publish a container's port or a range of ports to the host format: ip:hostPort:containerPort" aka 80 (host port) : 8080 (internal port)
upvoted 1 times
...
cerifyme85
1 year, 10 months ago
Selected Answer: BD
As per outrageous7
upvoted 1 times
...
outrageous7
1 year, 10 months ago
Selected Answer: BD
<port you are exposing>:<internal port> that's the way !!
upvoted 3 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