-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Brotli support for nginx alpine image #371
Comments
The point about not shipping third-party modules still stands though. |
@thresheek do we have right now any reason not to add Brotli support to nginx official modules? If there is some legal reason, could we make the exception of using a third-party module here? If there are no good reasons, how we can help in adding Brotli support to nginx? Brotli looks like a great feature for performance, but right now there is no good Docker image with nginx and Brotli. |
The only way to add brotli to this image is to make it a part of an official nginx distribution. I see no way we can support that otherwise. |
@thresheek of course. I think that nginx should support Brotli by default. What we can do to add official Brotli support? I saw batch in nginx tracker. Maybe there is a way to vote or pay to promote some feature? |
I would say sending a patch to the development mailing list would at least make sure developers could comment on it; however I see it was submitted in early 2017 with no real reply, which is frustrating. |
A viable option would be also to implement a "development image" as discussed in #239 - it wouldnt have the effect of an image that will have all the modules built-in, but would it make easier for everyone to do their own images/build the modules they need. |
@thresheek in 2017 nginx devs not accept it due to same reason, because google/ngx_brotli stop their development. |
Now it is not a problem, since Google continue development |
We need to find some idea how to create official nginx image with brotli support. It's looks like few additional strings in dockerfile, can provide huge positive impact on community. Also de-facto best in class nginx web server just in win-win situation if support will be provided. |
You can add brotli support with your own alpine image easily enough afaik. Drawback is that you don't build from source, using the version of Alpines nginx package(current alpine:3.10 provides nginx 1.16.x). I have not tried it yet, but they have quite a few modules are available as separate packages, you just install them with the nginx package and should have support. I've done similar with PHP. I'm not entirely sure how that works if you're meant to compile them in like I've seen official nginx and PHP images do(building from source instead). But presumably if someone submitted a Looks like they're included as dynamically linked modules to make them optional. Is that something that could be done here too? |
A nice solution would be to create an official ONBUILD image that would allow developers to specify any additional modules which are not "officially" supported by the team, this way the responsibility of maintaining these modules wouldn't fall on the team itself, while developers would have a fairly straightforward way to build additional modules on top of the upstream image. Though I'm not really sure how simple it is to implement such an image. |
Any news? |
Nobody volunteered a solution so far. As per ONBUILD, using those is discouraged: docker-library/official-images#2076 |
Another possible solution, would be to add a brotli_static similar to gzip_static, so at least pre-compressed files could be served. |
What are the alternatives to have brotli if it won't be included in the base image ? |
If moving out of nginx is okay, caddy is a good alternative.
…On Thu, Aug 20, 2020, 14:10 Ahmed El Moden ***@***.***> wrote:
What are the alternatives to have brotli if it won't be included in the
base image ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#371 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSLJZPKXCFS53GHC3SOH33SBTOODANCNFSM4I7MJ7IQ>
.
|
@Herz3h The docker image fholzer/nginx-brotli has nginx with brotli support. |
Still not on roadmap? brotli is already standard for web(text) compression... |
Sorry for the mean words, I removed them. Edit: I found a way to minimally extend the official image with ngx_brotli support, see here: https://github.com/Korijn/docker-nginx-brotli |
Would be nice to get Brotli support upstream. |
This is a must have feature. |
I think there's a drop-in nginx brotli module coming to alpine soon. |
Hi. I've added a way to make it easier to add modules on top of the official image, please check https://github.com/nginxinc/docker-nginx/tree/master/modules for more information. |
Thanks @thresheek for creating that Dockerfile! I created a GitHub Actions workflow that automatically checks for updates to the official I make these fully automatically built images available at georgjung/nginx-brotli, if that might help anyone. |
@wokalek Thanks for creating this, it's always better to have multiple options to choose from. I created https://hub.docker.com/r/georgjung/nginx-brotli because I disliked most of the existing nginx-brotli images for becoming stale because they are manually maintained. For something as critical as a webserver it felt wrong to me that security patches could reach my servers weeks or months later if the maintainer (or: "some random dude on the internet") lost interest/is on holiday/... At the same time I fully understand and feel that keeping a close eye for regular maintenance tasks that aren't even about someone's own code (but nginx's) isn't the most fun thing to do as a freetime OSS contributor. Nevertheless, while I wouldn't want to push anyone to use my image rather than yours, I wondered if there is any advantage in using your (manually created if I get it right?) image rather than the |
Hey! Thanks for commenting on my work! I came across your image on the Docker Hub and I remember that I tried to find the repository, but for some reason I didn’t find it with my eyes on Github (but now I took a closer look and got acquainted with it). My image is positioned as a lightweight alternative to the original nginx image, but with brotli support. I do not really like to enter into discussions "whose approach is better", but I will say a few words.
|
Brotli is included in NGINX Plus, so it's never will be included in standard nginx (who knows...) |
@wokalek Brotli support in NGINX Plus is exactly the same what we ship via https://github.com/nginxinc/docker-nginx/tree/master/modules and |
I mean it won't be included by default in a standard nginx build. You must specify it for the build yourself, or use NGINX Plus, if I understand everything correctly. |
Indeed. At least for now, there are no plans to include Brotli support in main nginx codebase. |
thank u @georg-jung for the nginx-brotli img :D works perfectly |
This is what I had to do to add brotli and other modules to my official nginx docker image...
you can trigger the creation of such local image using: it's wrong... it's not really what I want... it's actually using the nginx compiled by alpine and not the nginx compiled by nginx team... but this hack is what I'm using while I wait for the nginx team to provide a better solution to have an official image with official brotli support again.. it's not what I really want... but sharing what I am currently doing in case it's of use to others |
Would be good to have official nginx alpine docker image with brotli support with fall back to gzip.
Previously I found #210 issue with closed #216 PR. That PR closed due to issue where google/ngx_brotli want to drop support in 2017, but today looks like google/ngx_brotli now live! Previous fork eustas/ngx_brotli merged back to original repo.
Today all major browsers support brotli and that algorithm very efficient.
Would be good to have brotli + nginx alpine docker image
The text was updated successfully, but these errors were encountered: