swagger-api / swagger-api/swagger-codegen

[docker] Hardcoded HTTP port in the generator container

Open
#3,386 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

As for now generator container listens on port 8080. To change the HTTP port I have to repeat the command from the Dockerfile with additional options:
docker run -d swagger-generator java -jar /generator/jetty-runner.jar --port 80 /generator/swagger-generator.war
--port 80 is my addition to make container listen on port 80
It would be great to an ability to set HTTP port via environment variables and don't depend on internals of the Dockerfile.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modules/swagger-generator/Dockerfile at the referenced command that launches jetty-runner.jar and inspect how port 8080 is fixed. Make the HTTP port configurable through an environment variable while preserving the current default, then run the documented docker command with a custom port and confirm the generator listens there.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.