πŸ“Š Docker
Q. Which of the following is the correct way to expose a Docker container’s port to the host?
  • (A) docker run -p 8080:80 container_name
  • (B) docker run --port 8080:80 container_name
  • (C) docker expose -p 8080:80 container_name
  • (D) docker bind 8080:80 container_name
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker run -p 8080:80 container_name

Explanation: 'docker run -p 8080:80 container_name' is the correct command to expose a port from the container to the host.

Explanation by: Gopal Sharma
'docker run -p 8080:80 container_name' is the correct command to expose a port from the container to the host.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
67
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
90%
Success Rate