Skip to content

Remove hardcoded port ENV var from Dockerfile#26

Merged
jthomperoo merged 4 commits intomainfrom
copilot/fix-config-file-port-setting
Apr 1, 2026
Merged

Remove hardcoded port ENV var from Dockerfile#26
jthomperoo merged 4 commits intomainfrom
copilot/fix-config-file-port-setting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

ENV DevOidcToolkit__Port=8080 in the Dockerfile took precedence over config.json, making file-based port configuration silently ignored.

Changes

  • Dockerfile: Remove ENV DevOidcToolkit__Port; retain ENV DevOidcToolkit__Address=0.0.0.0 (required for Docker networking); update EXPOSE and HEALTHCHECK to port 80 (the application default)
  • README / docs: Update docker run examples from -p 8080:8080-p 8080:80 to reflect the container now listening on port 80 by default
  • Example JSON configs: Update example "Port" values from 8080 to 80 to match the application default
  • CHANGELOG: Added a breaking change entry noting the Docker default port change from 8080 to 80

Users who need a custom port can now set it via config.json or an explicit -e DevOidcToolkit__Port=... without it being silently overridden.

⚠️ Breaking Change: Docker port mappings must be updated from -p 8080:8080 to -p 8080:80.

Copilot AI linked an issue Apr 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix config file to set server port properly Remove hardcoded port/address ENV vars from Dockerfile Apr 1, 2026
Copilot AI requested a review from jthomperoo April 1, 2026 09:22
Copy link
Copy Markdown
Member

@jthomperoo jthomperoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a changelog update, noting it's a breaking change.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 1, 2026

This needs a changelog update, noting it's a breaking change.

Added a breaking change entry to the [Unreleased] section of the changelog in d2519d7, noting the Docker default port change from 8080 to 80 and linking to the issue.

Copilot AI requested a review from jthomperoo April 1, 2026 09:33
Copy link
Copy Markdown
Member

@jthomperoo jthomperoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this for Docker we still need to bind Address to 0.0.0.0 for Docker

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 1, 2026

Testing this for Docker we still need to bind Address to 0.0.0.0 for Docker

Re-added ENV DevOidcToolkit__Address=0.0.0.0 to the Dockerfile in daf2d46 — only ENV DevOidcToolkit__Port=8080 is removed. The address binding remains so the app is reachable from outside the container.

Copilot AI changed the title Remove hardcoded port/address ENV vars from Dockerfile Remove hardcoded port ENV var from Dockerfile Apr 1, 2026
Copilot AI requested a review from jthomperoo April 1, 2026 09:52
@jthomperoo jthomperoo marked this pull request as ready for review April 1, 2026 10:06
@jthomperoo jthomperoo merged commit b335bc8 into main Apr 1, 2026
7 checks passed
@jthomperoo jthomperoo deleted the copilot/fix-config-file-port-setting branch April 1, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Can't use config file to set port

2 participants