Merge pull request #81 from jkaninda/develop

Add add php 8.4 RC
This commit is contained in:
2024-11-17 19:17:15 +01:00
committed by GitHub
10 changed files with 100 additions and 308 deletions

View File

@@ -3,82 +3,104 @@ on:
push:
branches:
- master
env:
BUILDKIT_IMAGE: jkaninda/laravel-php-fpm
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push 8.0
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.0/Dockerfile"
push: true
tags: "${{env.BUILDKIT_IMAGE}}:8.0"
-
name: Build and push 8.1
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.1/Dockerfile"
file: "./src/docker/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
tags: "${{env.BUILDKIT_IMAGE}}:8.1"
-
name: Build and push 8.2
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.2/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
tags: "${{env.BUILDKIT_IMAGE}}:8.2"
build-args: |
phpVersion=8.1
tags: "${{ vars.BUILDKIT_IMAGE }}:8.1"
-
name: Build and push 8.1 alpine
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.1/Dockerfile.alpine"
file: "./src/docker/Dockerfile.alpine"
push: true
platforms: linux/amd64,linux/arm64
tags: |
"${{env.BUILDKIT_IMAGE}}:8.1-alpine"
build-args: |
phpVersion=8.1
tags: "${{ vars.BUILDKIT_IMAGE }}:8.1-alpine"
-
name: Build and push 8.2
uses: docker/build-push-action@v3
with:
file: "./src/docker/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
build-args: |
phpVersion=8.2
tags: "${{vars.BUILDKIT_IMAGE}}:8.2"
-
name: Build and push 8.2 alpine
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.2/Dockerfile.alpine"
file: "./src/docker/Dockerfile.alpine"
push: true
platforms: linux/amd64,linux/arm64
tags: |
"${{env.BUILDKIT_IMAGE}}:8.2-alpine"
-
name: Build and push 8.3 alpine
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.3/Dockerfile.alpine"
push: true
platforms: linux/amd64,linux/arm64
tags: |
"${{env.BUILDKIT_IMAGE}}:8.3-alpine"
build-args: |
phpVersion=8.2
tags: "${{vars.BUILDKIT_IMAGE}}:8.2-alpine"
-
name: Build and push 8.3
uses: docker/build-push-action@v3
with:
file: "./src/docker/8.3/Dockerfile"
file: "./src/docker/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
build-args: |
phpVersion=8.3
tags: |
"${{env.BUILDKIT_IMAGE}}:8.3"
"${{env.BUILDKIT_IMAGE}}:latest"
"${{vars.BUILDKIT_IMAGE}}:8.3"
"${{vars.BUILDKIT_IMAGE}}:latest"
-
name: Build and push 8.3 alpine
uses: docker/build-push-action@v3
with:
file: "./src/docker/Dockerfile.alpine"
push: true
platforms: linux/amd64,linux/arm64
build-args: |
phpVersion=8.3
tags: |
"${{vars.BUILDKIT_IMAGE}}:8.3-alpine"
-
name: Build and push 8.4 RC
uses: docker/build-push-action@v3
with:
file: "./src/docker/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
build-args: |
phpVersion=8.4.0RC4
tags: |
"${{vars.BUILDKIT_IMAGE}}:8.4.0RC4"
-
name: Build and push 8.4 RC alpine
uses: docker/build-push-action@v3
with:
file: "./src/docker/Dockerfile.alpine"
push: true
platforms: linux/amd64,linux/arm64
build-args: |
phpVersion=8.4.0RC4
tags: |
"${{vars.BUILDKIT_IMAGE}}:8.4.0RC4-alpine"

View File

@@ -1,4 +1,4 @@
name: Integration Test
name: Tests
on:
push:
jobs:

View File

@@ -1,7 +1,27 @@
IMAGE_NAME:jkaninda/laravel-php-fpm
build-8.1:
docker buildx build -f src/docker/8.1/Dockerfile -t ${IMAGE_NAME}:8.1 .
build-8.2:
docker buildx build -f src/docker/8.2/Dockerfile -t ${IMAGE_NAME}:8.2 .
build-8.3:
docker buildx build -f src/docker/8.3/Dockerfile -t ${IMAGE_NAME}:8.3 .
IMAGE_NAME?=jkaninda/laravel-php-fpm
.PHONY: all
all: build
##@ Build
.PHONY: build
build: build-81 build-82 build-83 build-84
.PHONY: build-80
build-80:
docker build --build-arg phpVersion=8.0 -f src/docker/8.0/Dockerfile -t ${IMAGE_NAME}:8.0 .
.PHONY: build-81
build-81:
docker build --build-arg phpVersion=8.1 -f src/docker/Dockerfile -t ${IMAGE_NAME}:8.1 .
.PHONY: build-82
build-82:
docker build --build-arg phpVersion=8.2 -f src/docker/Dockerfile -t ${IMAGE_NAME}:8.2 .
.PHONY: build-83
build-83:
docker build --build-arg phpVersion=8.3 -f src/docker/Dockerfile -t ${IMAGE_NAME}:8.3 .
.PHONY: build-84
build-84:
docker build --build-arg phpVersion=8.4.0RC4 -f src/docker/Dockerfile -t ${IMAGE_NAME}:8.4 .
.PHONY: build-81-alpine
build-81-alpine:
docker build --build-arg phpVersion=8.1 -f src/docker/Dockerfile.alpine -t ${IMAGE_NAME}:8.1-alpine .
.PHONY: build-84-alpine
build-84-alpine:
docker build --build-arg phpVersion=8.4.0RC4 -f src/docker/Dockerfile.alpine -t ${IMAGE_NAME}:8.4.0RC4-alpine .

View File

@@ -1,5 +1,5 @@
[![Build](https://github.com/jkaninda/laravel-php-fpm/actions/workflows/build.yml/badge.svg)](https://github.com/jkaninda/laravel-php-fpm/actions/workflows/build.yml)
[![Integration Test](https://github.com/jkaninda/laravel-php-fpm/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/jkaninda/laravel-php-fpm/actions/workflows/integration-tests.yml)
[![Tests](https://github.com/jkaninda/laravel-php-fpm/actions/workflows/tests.yml/badge.svg)](https://github.com/jkaninda/laravel-php-fpm/actions/workflows/tests.yml)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/jkaninda/laravel-php-fpm?style=flat-square)
![Docker Pulls](https://img.shields.io/docker/pulls/jkaninda/laravel-php-fpm?style=flat-square)

View File

@@ -1,23 +0,0 @@
FROM php:8.1-fpm-alpine
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1
ARG GROUP_ID=1000
ARG USER_ID=1000
ENV USER_NAME=www-data
ARG GROUP_NAME=www-data
# Install the PHP pdo_mysql extention
RUN docker-php-ext-install pdo_mysql
# 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/php.ini $PHP_INI_DIR/conf.d/

View File

@@ -1,102 +0,0 @@
FROM php:8.2-fpm
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1
ENV NODE_MAJOR=20
ARG GROUP_ID=1000
ARG USER_ID=1000
ENV USER_NAME=www-data
ARG GROUP_NAME=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
# Install Nodejs
RUN apt-get update && apt-get install -y ca-certificates curl gnupg
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install nodejs -y
# 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/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 ${USER_ID} ${USER_NAME}
RUN groupmod -g ${USER_ID} ${GROUP_NAME}
RUN chown -R ${USER_NAME}:${GROUP_NAME} /var/www && \
chown -R ${USER_NAME}:${GROUP_NAME} /var/log/ && \
chown -R ${USER_NAME}:${GROUP_NAME} /etc/supervisor/conf.d/ && \
chown -R ${USER_NAME}:${GROUP_NAME} $PHP_INI_DIR/conf.d/ && \
chown -R ${USER_NAME}:${GROUP_NAME} /tmp
EXPOSE 9000
CMD [ "entrypoint" ]

View File

@@ -1,103 +0,0 @@
FROM php:8.3.4-fpm
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1
ENV NODE_MAJOR=20
ARG GROUP_ID=1000
ARG USER_ID=1000
ENV USER_NAME=www-data
ARG GROUP_NAME=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
# Install Nodejs
RUN apt-get update && apt-get install -y ca-certificates curl gnupg
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install nodejs -y
# 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/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 ${USER_ID} ${USER_NAME}
RUN groupmod -g ${USER_ID} ${GROUP_NAME}
RUN chown -R ${USER_NAME}:${GROUP_NAME} /var/www && \
chown -R ${USER_NAME}:${GROUP_NAME} /var/log/ && \
chown -R ${USER_NAME}:${GROUP_NAME} /etc/supervisor/conf.d/ && \
chown -R ${USER_NAME}:${GROUP_NAME} $PHP_INI_DIR/conf.d/ && \
chown -R ${USER_NAME}:${GROUP_NAME} /tmp
EXPOSE 9000
CMD [ "entrypoint" ]

View File

@@ -1,23 +0,0 @@
FROM php:8.3-fpm-alpine
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1
ARG GROUP_ID=1000
ARG USER_ID=1000
ENV USER_NAME=www-data
ARG GROUP_NAME=www-data
# Install the PHP pdo_mysql extention
RUN docker-php-ext-install pdo_mysql
# 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/php.ini $PHP_INI_DIR/conf.d/

View File

@@ -1,4 +1,5 @@
FROM php:8.1-fpm
ARG phpVersion=8.3-dev
FROM php:${phpVersion}-fpm
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1
@@ -27,7 +28,6 @@ RUN apt-get update && apt-get install -y \
sqlite3 \
nano \
cron
# Install Nodejs
RUN apt-get update && apt-get install -y ca-certificates curl gnupg
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
@@ -70,6 +70,7 @@ 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
@@ -82,7 +83,6 @@ mkdir -p /var/www/html
ADD src/index.php $WORKDIR/index.php
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/
@@ -92,9 +92,9 @@ RUN ln -s /usr/local/bin/entrypoint.sh /
ENTRYPOINT ["entrypoint.sh"]
RUN usermod -u ${USER_ID} ${USER_NAME}
RUN groupmod -g ${USER_ID} ${GROUP_NAME}
RUN chown -R ${USER_NAME}:${GROUP_NAME} /var/www && \
RUN usermod -u ${USER_ID} ${USER_NAME} && \
groupmod -g ${USER_ID} ${GROUP_NAME} && \
chown -R ${USER_NAME}:${GROUP_NAME} /var/www && \
chown -R ${USER_NAME}:${GROUP_NAME} /var/log/ && \
chown -R ${USER_NAME}:${GROUP_NAME} /etc/supervisor/conf.d/ && \
chown -R ${USER_NAME}:${GROUP_NAME} $PHP_INI_DIR/conf.d/ && \

View File

@@ -1,4 +1,5 @@
FROM php:8.2-fpm-alpine
ARG phpVersion=8.3-dev
FROM php:${phpVersion}-fpm-alpine
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1