-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Docker from Debian base image #3500
Conversation
Alkarex
commented
Jul 6, 2023
•
edited
Loading
edited
- Fix expose Docker port 9000? #3234
- Re-fix better logs Use standard Docker logs #3333
- Update to Debian 12 Bookworm instead of Debian 10 Buster
- Use Debian packaging instead of having to keep track of and manually install -dev libraries, and with LTS support
- Update to PHP 8.2 instead of PHP 8.0
- Divided by two the size of the Docker image (from 485MB down to 202MB)
* Fix expose RSS-Bridge#3234 * Re-fix better logs RSS-Bridge#3333 * Update to Debian 12 Bookworm instead of Debian 10 Buster * Use Debian packaging instead of having to keep track of and manually install -dev libraries, and with LTS support * Update to PHP 8.2 instead of PHP 8.0
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using symlink to stdout / stderr instead, cf. Dockerfile
COPY ./config/php-fpm.conf /etc/php/8.2/fpm/pool.d/rss-bridge.conf | ||
COPY ./config/php.ini /etc/php/8.2/cli/conf.d/90-rss-bridge.conf | ||
|
||
# logs should go to stdout / stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,6 +13,6 @@ server { | |||
|
|||
location ~ \.php$ { | |||
include snippets/fastcgi-php.conf; | |||
fastcgi_pass 127.0.0.1:9000; | |||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using socket instead of TCP (should have less overhead)
# logs should go to stdout / stderr | ||
RUN ln -sfT /dev/stderr /var/log/nginx/error.log; \ | ||
ln -sfT /dev/stdout /var/log/nginx/access.log; \ | ||
chown -R --no-dereference www-data:adm /var/log/nginx/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does nginx run as www-data
user? i guess so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are the same rights than what nginx sets by default on the logs
|
This PR could be broken down if any part is not appropriate for now |
i tested the pr and all is good. there were some additional deprecation notices etc. but unable to test all bridges so cannt tell if any of them errors. can we preserve the usage of php 8.0.x ? dont want accidental breakage when users upgrade their docker containers. otherwise all is good |
Using the suggested Debian base image, supporting PHP 8.0 would not be convenient: Debian has long term support for PHP 7.4 and PHP 8.2, nothing in between: With the base image used before this PR, it would be possible to support PHP 8.0 for 4 more months (until November 2023): Note: the base image used before this PR was with a specific version 8.0.27, so it was not automatically updated to currently supported releases (4 months since last update), but it would be possible to update to
An Ubuntu base image could also be an option, as it has more frequent releases than Debian (though more "corporate" than Debian), but only down to PHP 8.1, not PHP 8.0, using Ubuntu 22.04 LTS Otherwise, Alpine Linux could also be an option (but less known than Debian for developers, and with a relatively different configuration) with support for PHP 8.0 until May 2024 For info, the new approach also decreases the size of the Docker image by over a factor two:
|
i have done research. there is not much BC break from 8.0 to 8.2. i think it's okay. lets wait for input from others |
To optimise caching
FYI, I have also made this related PR to also update to Debian 12 Bookworm: lwthiker/curl-impersonate#168 |
@dvikan As far as I can see, everything is working here, including the current |
Just for information, lwthiker/curl-impersonate#168 has been merged, though no new release yet. |
thanks for keeping an eye on this |
Mistake from RSS-Bridge#3500 Wrong file extension: should have been `.ini` and not `.conf` otherwise it has no effect. See docker-library/php#1360 and docker-library/php#878 (comment)
ENV CURL_IMPERSONATE ff91esr | ||
|
||
COPY ./config/nginx.conf /etc/nginx/sites-available/default | ||
COPY ./config/php-fpm.conf /etc/php/8.2/fpm/pool.d/rss-bridge.conf | ||
COPY ./config/php.ini /etc/php/8.2/fpm/conf.d/90-rss-bridge.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #3875
Mistake from #3500 Wrong file extension: should have been `.ini` and not `.conf` otherwise it has no effect. See docker-library/php#1360 and docker-library/php#878 (comment)