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.)
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.
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.
<port you are exposing>:<internal port> that's the way !!
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.200-901 Exam Questions
Log in to ExamTopics
Sign in:
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.
chris_edwards
Highly Voted 1 year, 10 months agonospampls
Highly Voted 1 year, 9 months agonospampls
1 year, 9 months agokymoni
Most Recent 6 months, 4 weeks agolouisvuitton12
9 months, 2 weeks agoosamodas
1 year, 1 month agoymmit78
1 year, 1 month agocerifyme85
1 year, 10 months agooutrageous7
1 year, 10 months ago