Skip to content

fix: Minimum fix to not always write the config file #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2025

Conversation

xaviergrandmougin
Copy link
Contributor

@xaviergrandmougin xaviergrandmougin commented Jul 28, 2025

Proposed changes

The listen-on-ipv6-by-default script is always trying to modify the /etc/nginx/conf.d/default.conf file, even if the configuration is already correct. This leads to an error in the logs when using a read-only file system.

No attempt to modify /etc/nginx/conf.d/default.conf should be done if the configuration is correct, and this issue is fixed in this short PR.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

  • I have read the contributing guidelines
  • I have signed the F5 Contributor License Agreement (CLA)
  • I have run the update.sh script and ensured all entrypoint/Dockerfile template changes have been applied to the relevant image entrypoint scripts & Dockerfiles
  • I have tested that the NGINX Docker unprivileged image builds and runs correctly on all supported architectures on an unprivileged environment (check out the README for more details)
  • I have updated any relevant documentation (README.md)

@xaviergrandmougin xaviergrandmougin requested a review from a team as a code owner July 28, 2025 06:42
Copy link

github-actions bot commented Jul 28, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@xaviergrandmougin
Copy link
Contributor Author

I have hereby read the F5 CLA and agree to its terms

@xaviergrandmougin xaviergrandmougin changed the title fix(issue-330): Minimum fix not always writing the config file fix(issue-330): Minimum fix to not always write the config file Jul 28, 2025
@xaviergrandmougin
Copy link
Contributor Author

The title says "minimum fix", because the grep pattern could be upgraded to something like listen[[:space:]][[:space:]]*\[::]\:8080;.

@alessfg alessfg added the bug Something isn't working label Aug 7, 2025
@alessfg
Copy link
Member

alessfg commented Aug 7, 2025

Thanks for the fix!

@alessfg alessfg requested a review from thresheek August 8, 2025 14:21
@alessfg
Copy link
Member

alessfg commented Aug 8, 2025

Just as a brief FYI, I am waiting until nginx/docker-nginx#994 gets merged and then I will merge this PR :)

@alessfg alessfg removed the request for review from thresheek August 8, 2025 14:21
@alessfg alessfg merged commit 314fb3f into nginx:main Aug 17, 2025
19 checks passed
@alessfg alessfg linked an issue Aug 17, 2025 that may be closed by this pull request
@alessfg alessfg changed the title fix(issue-330): Minimum fix to not always write the config file fix: Minimum fix to not always write the config file Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entrypoint script always try to modify default config
2 participants