Implementing DevOps Solutions and Practices Using Cisco Platforms (DEVOPS) — Question 11

A DevOps engineer has built a new container and must open port 8080 for intercontainer communication. Which command must be added in a Dockerfile to accomplish this goal?

Answer options

Correct answer: A

Explanation

The correct command is 'EXPOSE 8080' as it is specifically designed to inform Docker that the container will listen on the specified network port at runtime. The other options are either incorrect commands or do not exist in the Docker context, thus they would not achieve the desired outcome.