What impact has EXPOSE in the Dockerfile for OpenShift 3?

Solution In Progress - Updated -

Issue

  • We built apache web server on port 8080, deployed the same and configured service and route accordingly on port 8080.
  • Then updated apache configuration to listen on port 8084. But I kept EXPOSE 8080 in Dockerfile. Updated the image and then had to adjust service to point to 8084. After that, everything was still working.
  • Why httpd is configured to listen on port 8084? Docker should only expose 8080?

Environment

  • OpenShift Container Platform
    • 3.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.