fix(docker): explicitly enable IPv6 in nginx config (#264)#332
Open
LeC-D wants to merge 1 commit intoiib0011:mainfrom
Open
fix(docker): explicitly enable IPv6 in nginx config (#264)#332LeC-D wants to merge 1 commit intoiib0011:mainfrom
LeC-D wants to merge 1 commit intoiib0011:mainfrom
Conversation
a30d70e to
c0f227b
Compare
Author
|
Rebased on upstream |
Author
|
Rebased on upstream |
Collaborator
|
Hello, thanks! I’ll let @iib0011 check this out, as I’m not very familiar with DevOps. |
c0f227b to
6a6c728
Compare
Author
|
Rebased on upstream |
The nginx:alpine entrypoint script (10-listen-on-ipv6-by-default.sh) skips IPv6 configuration when it detects that default.conf has been modified. Since we already patch default.conf via sed, IPv6 was never enabled in the Docker container. Fix: add a listen [::]:80 directive explicitly via an additional sed command, mirroring what the entrypoint script would have done.
6a6c728 to
3c4c0e1
Compare
Author
|
Rebased on upstream |
Author
|
Rebased on upstream |
Author
|
Rebased on upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #264
Problem
The
nginx:alpineimage ships with a startup script (10-listen-on-ipv6-by-default.sh) that automatically addslisten [::]:80;to/etc/nginx/conf.d/default.conf— but only if the file hasn't been modified. Since the Dockerfile already patchesdefault.confviased(to addtry_files), the script detects the change and skips IPv6 configuration. As a result, the container only listens on IPv4.Fix
Add an explicit
listen [::]:80;directive via a separateRUN sedcommand, mirroring exactly what the entrypoint script would have done.+ RUN sed -i 's|listen 80;|listen 80;\n listen [::]:80;|' /etc/nginx/conf.d/default.confTesting
Verified the resulting
default.confcontains bothlisten 80;andlisten [::]:80;after the build stage. No functional changes to routing or static file serving.