removed ARM images (unused), Migrated php-2.2 CLI crons to the FPM image
Some checks failed
Build and push image / Build (push) Failing after 35s

This commit is contained in:
Jack 2024-11-12 14:08:09 +00:00
parent b27aa50671
commit 1124d76045
6 changed files with 27 additions and 21 deletions

View File

@ -17,15 +17,13 @@ jobs:
- name: Buildx Container - name: Buildx Container
run: docker buildx create --name buildx --driver=docker-container run: docker buildx create --name buildx --driver=docker-container
- name: Build nginx-web - name: Build nginx-web
run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64 ./nginx-web -t git.tgj.services/thatguyjack/nginx-web:latest --push run: docker buildx build --builder=buildx --platform=linux/amd64 ./nginx-web -t git.tgj.services/thatguyjack/nginx-web:latest --push
- name: Build php-8.1-CLI - name: Build php-8.1-CLI
run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64 ./php-8-1-cli/ -t git.tgj.services/thatguyjack/php-cli:8.1 --push run: docker buildx build --builder=buildx --platform=linux/amd64 ./php-8-1-cli/ -t git.tgj.services/thatguyjack/php-cli:8.1 --push
- name: Build php-8.2-CLI
run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64 ./php-8-2-cli/ -t git.tgj.services/thatguyjack/php-cli:8.2 --push
- name: Build php8-1-FPM - name: Build php8-1-FPM
run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64 ./php-8-1-fpm/ -t git.tgj.services/thatguyjack/php-fpm:8.1 --push run: docker buildx build --builder=buildx --platform=linux/amd64 ./php-8-1-fpm/ -t git.tgj.services/thatguyjack/php-fpm:8.1 --push
- name: Build php-8-2-FPM - name: Build php-8-2-FPM
run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64 ./php-8-2-fpm/ -t git.tgj.services/thatguyjack/php-fpm:8.2 --push run: docker buildx build --builder=buildx --platform=linux/amd64 ./php-8-2-fpm/ -t git.tgj.services/thatguyjack/php-fpm:8.2 --push
# - name: Push # - name: Push
# run: | # run: |
# docker push git.tgj.services/thatguyjack/php-fpm:latest # docker push git.tgj.services/thatguyjack/php-fpm:latest

View File

@ -12,13 +12,14 @@ http {
server_names_hash_bucket_size 128; server_names_hash_bucket_size 128;
# set_real_ip_from 172.18.0.0/16; # set_real_ip_from 172.18.0.0/16;
# set_real_ip_from fd00:0:0:0:2::/64; # set_real_ip_from fd00:0:0:0:2::/64;
real_ip_recursive on;
real_ip_header X-Forwarded-For; real_ip_header X-Forwarded-For;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
sub_filter '</head>' '<script async="" src="https://ip-update.net/ipupdate.js"></script> </head>'; # sub_filter '</head>' '<script async="" src="https://ip-update.net/ipupdate.js"></script> </head>';
sub_filter_once on; # sub_filter_once on;
## ##
# Basic Settings # Basic Settings

View File

@ -13,6 +13,7 @@ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& chmod uga+x /usr/local/bin/install-php-extensions && sync && chmod uga+x /usr/local/bin/install-php-extensions && sync
RUN install-php-extensions bcmath \ RUN install-php-extensions bcmath \
gmp \
bz2 \ bz2 \
smbclient \ smbclient \
calendar \ calendar \
@ -43,29 +44,26 @@ RUN install-php-extensions bcmath \
xmlrpc \ xmlrpc \
xsl \ xsl \
zip \ zip \
gmp bcmath
#RUN apk add --no-cache ssmbclient #RUN apk add --no-cache libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libpangocairo-1.0-0 libgtk-3-0
RUN apk add chromium
RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \ RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo -e "\n xdebug.remote_enable=1 \n xdebug.remote_host=localhost \n xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ && echo -e "\n xdebug.remote_enable=1 \n xdebug.remote_host=localhost \n xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo -e "\n xhprof.output_dir='/var/tmp/xhprof'" >> /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini \ && echo -e "\n xhprof.output_dir='/var/tmp/xhprof'" >> /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini \
&& cd ~ && cd ~ \
# Install composer # Install composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "copy('https://composer.github.io/installer.sig', 'signature');" \ && php -r "copy('https://composer.github.io/installer.sig', 'signature');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('signature'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ && php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('signature'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \ && php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');" && php -r "unlink('composer-setup.php');" \
# Install WP-CLI # Install WP-CLI
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x wp-cli.phar \ && chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp && mv wp-cli.phar /usr/local/bin/wp \
# Install msmtp - To Send Mails on Production & Development # Install msmtp - To Send Mails on Production & Development
RUN apk add msmtp && apk add msmtp
RUN apk add --no-cache gnupg RUN apk add --no-cache gnupg
@ -78,3 +76,12 @@ RUN apk add \
&& usermod -u 1000 www-data \ && usermod -u 1000 www-data \
&& groupmod -g 1000 www-data \ && groupmod -g 1000 www-data \
&& apk del .shadow-deps && apk del .shadow-deps
RUN apk add sudo bash
COPY ./crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
RUN /usr/bin/crontab /etc/cron.d/crontab