Closed dunnaf-itemku closed 9 months ago
Hi @dunnaf-itemku
I apologize for any disruption this may cause. We are rolling out updated docker images based on the official php images. Rest assured we have taken steps to minimize the impact of this change on your existing setup.
Your feedback would be most appreciated, so if you could share your Dockerfile
, docker-compose.yml
or other customizations, it would help us ensure a smooth transition.
Please let me know if you have any other questions or concerns - we're committed to making this a seamless process.
Best regards.
Here's my Dockerfile
FROM shinsenter/phpfpm-apache:php8.2-tidy
ENV TZ="UTC"
ENV APACHE_DOCUMENT_ROOT="/public" ENV APACHE_SERVER_LIMIT=4 ENV APACHE_START_SERVERS=4 ENV APACHE_MIN_SPARE_THREADS=100 ENV APACHE_MAX_SPARE_THREADS=150 ENV APACHE_THREAD_LIMIT=100 ENV APACHE_THREADS_PER_CHILD=50 ENV APACHE_MAX_REQUEST_WORKERS=200 ENV APACHE_MAX_CONNECTIONS_PER_CHILD=0
ENV PHP_PM_CONTROL=dynamic ENV PHP_PM_MAX_CHILDREN=100 ENV PHP_PM_START_SERVERS=16 ENV PHP_PM_MIN_SPARE_SERVERS=8 ENV PHP_PM_MAX_SPARE_SERVERS=16
COPY . /var/www/html COPY doc/ /var/www/html/public/doc/ COPY docker-files/mpm_event.conf /etc/apache2/mods-available/mpm_event.conf
ARG CERT_DIR=/etc/ssl/web WORKDIR $CERT_DIR RUN openssl req -x509 \ -subj "/C=SG/ST=Singapore/L=Singapore/O=TEST Company/CN=localhost" \ -nodes -newkey rsa:4096 -keyout $CERT_DIR/server.key -out $CERT_DIR/server.crt -sha256 -days 365
RUN chown -R www-data:www-data /var/www/html
WORKDIR /var/www/html
ENTRYPOINT [] CMD /init
as you can see, I also create my own mpm_event.conf, cloned from your previous template
Also, this logs seems new to me
@dunnaf-itemku
I apologize once again for the inconvenience caused to you. Please try again with the Dockerfile below and let me know if it works.
FROM shinsenter/phpfpm-apache:php8.2-tidy
ENV TZ="UTC"
ENV PHP_PM=dynamic
ENV PHP_PM_MAX_CHILDREN=100
ENV PHP_PM_START_SERVERS=16
ENV PHP_PM_MIN_SPARE_SERVERS=8
ENV PHP_PM_MAX_SPARE_SERVERS=16
COPY . /var/www/html
COPY ./doc/ /var/www/html/public/doc/
WORKDIR /var/www/html
Since the new docker images focus mainly on configuring PHP, other configs for the webserver are kept at their original defaults.
You still can copy your config file for Apache into the docker container and use them, but avoid using environment variables (like APACHE_***), because the environment variables for Apache from the old version are no longer available.
In addition, you don't need to create SSL certificates for Apache since they are pre-generated for the localhost environment.
I hope this helps.
Thank you for your response
Also took your suggestion, but it persisted even after I updated my Dockerfile to this
FROM shinsenter/phpfpm-apache:php8.2-tidy
ENV TZ="UTC"
ENV PHP_PM=dynamic ENV PHP_PM_MAX_CHILDREN=100 ENV PHP_PM_START_SERVERS=16 ENV PHP_PM_MIN_SPARE_SERVERS=8 ENV PHP_PM_MAX_SPARE_SERVERS=16
COPY . /var/www/html COPY doc/ /var/www/html/public/doc/
RUN chown -R www-data:www-data /var/www/html
WORKDIR /var/www/html
ENTRYPOINT [] CMD /init
@dunnaf-itemku
Please also remove ENTRYPOINT and CMD from the Dockerfile.
Well, that is it, thats the problem, removed those 2 and now everything is working, even when I using the previous set up. To be honest, I used those 2 so I can easily override commands from ECS Task Definition. May I know, why we need to remove those 2 in this version?
@dunnaf-itemku
As I mentioned previously, the new docker images will be built on top of the official php docker images and I'm trying to keep the docker images with as many default settings as possible, and focus on customizing the settings for PHP.
You can absolutely use the default ENTRYPOINT and CMD from the official php docker images.
ENTRYPOINT "docker-php-entrypoint"
CMD “/bin/sh”
Hmm Okay, I think everything is clear now, really appreciate your help, Thanks!
@dunnaf-itemku Glad to hear that.
@dunnaf-itemku I am working on the new documentation. I hope it helps. https://github.com/shinsenter/php/blob/5.x/README.md
@shinsenter Please don't overwrite existing tags - they should really be immutable otherwise you risk breaking downstream builds (as currently our builds are broken because of recent changes...) Please adjust the naming of your tags to provide immutable tags that never change after first upload...
@hameno
I have replied here https://github.com/shinsenter/php/discussions/38#discussioncomment-8348337
Hi there,
Currently i got errors in my docker container
AH00526: Syntax error on line 125 of /etc/apache2/httpd.conf: User takes one argument, Effective user id for this server [26-Jan-2024 10:12:21] ERROR: failed to open configuration file '/usr/local/etc/php-fpm.d/zz-generated-settings.conf': No such file or directory (2) [26-Jan-2024 10:12:21] ERROR: failed to load configuration file '/usr/local/etc/php-fpm.d/zz-generated-settings.conf' [26-Jan-2024 10:12:21] ERROR: FPM initialization failed
This has been happening lately, and I see you've done something there, am I missing something?