mirror of
https://github.com/jkaninda/nginx-php-fpm.git
synced 2025-12-06 21:49:41 +01:00
Add PHP 8.3 version
This commit is contained in:
10
.github/workflows/build-manual.yml
vendored
10
.github/workflows/build-manual.yml
vendored
@@ -70,6 +70,14 @@ jobs:
|
|||||||
file: "./src/docker/8.2/Dockerfile"
|
file: "./src/docker/8.2/Dockerfile"
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: "${{env.BUILDKIT_IMAGE}}:8.2"
|
||||||
|
-
|
||||||
|
name: Build and push 8.3
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
file: "./src/docker/8.3/Dockerfile"
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
"${{env.BUILDKIT_IMAGE}}:8.2"
|
"${{env.BUILDKIT_IMAGE}}:8.3"
|
||||||
"${{env.BUILDKIT_IMAGE}}:latest"
|
"${{env.BUILDKIT_IMAGE}}:latest"
|
||||||
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -51,6 +51,14 @@ jobs:
|
|||||||
file: "./src/docker/8.2/Dockerfile"
|
file: "./src/docker/8.2/Dockerfile"
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: "${{env.BUILDKIT_IMAGE}}:8.2"
|
||||||
|
-
|
||||||
|
name: Build and push 8.3
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
file: "./src/docker/8.3/Dockerfile"
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
"${{env.BUILDKIT_IMAGE}}:8.2"
|
"${{env.BUILDKIT_IMAGE}}:8.3"
|
||||||
"${{env.BUILDKIT_IMAGE}}:latest"
|
"${{env.BUILDKIT_IMAGE}}:latest"
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
## Specifications:
|
## Specifications:
|
||||||
|
|
||||||
* PHP 8.2 / 8.1 / 8.0 / 7.4 / 7.2
|
* PHP 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.2
|
||||||
* Composer
|
* Composer
|
||||||
* OpenSSL PHP Extension
|
* OpenSSL PHP Extension
|
||||||
* XML PHP Extension
|
* XML PHP Extension
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM php:8.2.12-fpm
|
FROM php:8.2-fpm
|
||||||
ARG WORKDIR=/var/www/html
|
ARG WORKDIR=/var/www/html
|
||||||
ENV DOCUMENT_ROOT=${WORKDIR}
|
ENV DOCUMENT_ROOT=${WORKDIR}
|
||||||
ENV LARAVEL_PROCS_NUMBER=1
|
ENV LARAVEL_PROCS_NUMBER=1
|
||||||
|
|||||||
103
src/docker/8.3/Dockerfile
Normal file
103
src/docker/8.3/Dockerfile
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
FROM php:8.3.0-fpm
|
||||||
|
ARG WORKDIR=/var/www/html
|
||||||
|
ENV DOCUMENT_ROOT=${WORKDIR}
|
||||||
|
ENV LARAVEL_PROCS_NUMBER=1
|
||||||
|
ENV DOMAIN=_
|
||||||
|
ENV CLIENT_MAX_BODY_SIZE=15M
|
||||||
|
ENV NODE_VERSION=17.x
|
||||||
|
ARG HOST_UID=1000
|
||||||
|
ENV USER=www-data
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
libzip-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
librdkafka-dev \
|
||||||
|
libpq-dev \
|
||||||
|
openssh-server \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
supervisor \
|
||||||
|
sqlite3 \
|
||||||
|
nano \
|
||||||
|
cron
|
||||||
|
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
|
||||||
|
# Install Node
|
||||||
|
RUN apt-get install -y nodejs
|
||||||
|
# Install nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx
|
||||||
|
|
||||||
|
# Clear cache
|
||||||
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
# Install Kafka
|
||||||
|
RUN git clone https://github.com/arnaud-lb/php-rdkafka.git\
|
||||||
|
&& cd php-rdkafka \
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure \
|
||||||
|
&& make all -j 5 \
|
||||||
|
&& make install
|
||||||
|
|
||||||
|
# Install Rdkafka and enable it
|
||||||
|
RUN docker-php-ext-enable rdkafka \
|
||||||
|
&& cd .. \
|
||||||
|
&& rm -rf /php-rdkafka
|
||||||
|
|
||||||
|
# Install PHP extensions zip, mbstring, exif, bcmath, intl
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
|
||||||
|
RUN docker-php-ext-install zip mbstring exif pcntl bcmath -j$(nproc) gd intl
|
||||||
|
|
||||||
|
# Install Redis and enable it
|
||||||
|
RUN pecl install redis && docker-php-ext-enable redis
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Install the php memcached extension
|
||||||
|
RUN pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
# Install the PHP pdo_mysql extention
|
||||||
|
RUN docker-php-ext-install pdo_mysql
|
||||||
|
|
||||||
|
# Install the PHP pdo_pgsql extention
|
||||||
|
RUN docker-php-ext-install pdo_pgsql
|
||||||
|
|
||||||
|
# Install PHP Opcache extention
|
||||||
|
RUN docker-php-ext-install opcache
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR $WORKDIR
|
||||||
|
|
||||||
|
RUN rm -Rf /var/www/* && \
|
||||||
|
mkdir -p /var/www/html
|
||||||
|
|
||||||
|
ADD src/index.php $WORKDIR/index.php
|
||||||
|
ADD src/conf/nginx/default.conf /etc/nginx/sites-available/default
|
||||||
|
ADD src/php.ini $PHP_INI_DIR/conf.d/
|
||||||
|
ADD src/opcache.ini $PHP_INI_DIR/conf.d/
|
||||||
|
ADD src/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
COPY src/entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
RUN ln -s /usr/local/bin/entrypoint.sh /
|
||||||
|
|
||||||
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RUN usermod -u ${HOST_UID} www-data
|
||||||
|
RUN groupmod -g ${HOST_UID} www-data
|
||||||
|
|
||||||
|
RUN chmod -R 755 $WORKDIR
|
||||||
|
RUN chown -R www-data:www-data $WORKDIR
|
||||||
|
EXPOSE 80
|
||||||
|
CMD [ "entrypoint" ]
|
||||||
|
|
||||||
Reference in New Issue
Block a user