diff --git a/.github/workflows/build-manual.yml b/.github/workflows/build-manual.yml index c26a222..b45105a 100644 --- a/.github/workflows/build-manual.yml +++ b/.github/workflows/build-manual.yml @@ -70,6 +70,14 @@ jobs: file: "./src/docker/8.2/Dockerfile" push: true 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: | - "${{env.BUILDKIT_IMAGE}}:8.2" + "${{env.BUILDKIT_IMAGE}}:8.3" "${{env.BUILDKIT_IMAGE}}:latest" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64cd98d..43c6ccb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,6 +51,14 @@ jobs: file: "./src/docker/8.2/Dockerfile" push: true 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: | - "${{env.BUILDKIT_IMAGE}}:8.2" + "${{env.BUILDKIT_IMAGE}}:8.3" "${{env.BUILDKIT_IMAGE}}:latest" \ No newline at end of file diff --git a/README.md b/README.md index 642751b..78cbee9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## 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 * OpenSSL PHP Extension * XML PHP Extension diff --git a/src/docker/8.2/Dockerfile b/src/docker/8.2/Dockerfile index 551c17c..32926f3 100644 --- a/src/docker/8.2/Dockerfile +++ b/src/docker/8.2/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2.12-fpm +FROM php:8.2-fpm ARG WORKDIR=/var/www/html ENV DOCUMENT_ROOT=${WORKDIR} ENV LARAVEL_PROCS_NUMBER=1 diff --git a/src/docker/8.3/Dockerfile b/src/docker/8.3/Dockerfile new file mode 100644 index 0000000..7c4692c --- /dev/null +++ b/src/docker/8.3/Dockerfile @@ -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" ] +