Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-2461

Import deployment from Dockerfile ignores EXPOSE port values when create the service and route

XMLWordPrintable

      Description of problem:

      When the user imports an application from a Dockerfile which uses another port then 8080, and exports that via the EXPOSE, this value is ignored.

      When import such an application with the `oc` command the dockerfile is respected. See:

      oc new-app https://github.com/jerolimov/docker --context-dir nodeinfo-3000 --dry-run --output json

      DeploymentConfig => (pod) template => spec => containerPort: 3000
      Service => spec => ports => 3000

      Version-Release number of selected component (if applicable):

      4.6

      How reproducible:

      Always

      Steps to Reproduce:

      1. Switch to developer perspective
      2. Navigate to Add > Import from Dockerfile
      3. Enter a git repo which uses a Dockerfile and don't use the default port 8080, for example:
      Git repo: https://github.com/jerolimov/docker
      Context dir: /nodeinfo-3000
      4. Check "Route" > "Target port"
      5. Create the deployment

      Actual results:

      The Service and Route for the deployment uses the default port 8080.

      Expected results:

      The Service and Route for the deployment uses the exposed port from the Dockerfile.

      Additional info:

            sdoyle@redhat.com Serena Nichols
            cjerolim Christoph Jerolimov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: