Skip to content

Commit

Permalink
Add php83, drop php81 and update php82 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
stankolubomir authored Dec 19, 2023
1 parent b6d17f9 commit f4406b6
Show file tree
Hide file tree
Showing 63 changed files with 644 additions and 445 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
- '*'

jobs:
php81-cli-base:
name: Build and push php81 cli base image
php82-cli-base:
name: Build and push php82 cli base image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -32,15 +32,15 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./build/php81/cli/base
file: ./build/php81/cli/base/Dockerfile
cache-from: type=gha,scope=php81-cli
cache-to: type=gha,scope=php81-cli,mode=max
context: ./build/php82/cli/base
file: ./build/php82/cli/base/Dockerfile
cache-from: type=gha,scope=php82-cli
cache-to: type=gha,scope=php82-cli,mode=max
push: true
tags: anzusystems/php:${{ github.ref_name }}-php81-cli,anzusystems/php:latest-php81-cli
tags: anzusystems/php:${{ github.ref_name }}-php82-cli,anzusystems/php:latest-php82-cli

php81-cli-vipsffmpeg:
name: Build and push php81 cli vipsffmpeg image
php82-cli-vipsffmpeg:
name: Build and push php82 cli vipsffmpeg image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -58,15 +58,15 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./build/php81/cli/vipsffmpeg
file: ./build/php81/cli/vipsffmpeg/Dockerfile
cache-from: type=gha,scope=php81-cli-vipsffmpeg
cache-to: type=gha,scope=php81-cli-vipsffmpeg,mode=max
context: ./build/php82/cli/vipsffmpeg
file: ./build/php82/cli/vipsffmpeg/Dockerfile
cache-from: type=gha,scope=php82-cli-vipsffmpeg
cache-to: type=gha,scope=php82-cli-vipsffmpeg,mode=max
push: true
tags: anzusystems/php:${{ github.ref_name }}-php81-cli-vipsffmpeg,anzusystems/php:latest-php81-cli-vipsffmpeg
tags: anzusystems/php:${{ github.ref_name }}-php82-cli-vipsffmpeg,anzusystems/php:latest-php82-cli-vipsffmpeg

php81-fpm-vipsffmpeg-nginx:
name: Build and push php81 fpm vipsffmpeg-nginx image
php82-fpm-vipsffmpeg-nginx:
name: Build and push php82 fpm vipsffmpeg-nginx image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -84,15 +84,15 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./build/php81/fpm/vipsffmpeg-nginx
file: ./build/php81/fpm/vipsffmpeg-nginx/Dockerfile
cache-from: type=gha,scope=php81-fpm-vipsffmpeg-nginx
cache-to: type=gha,scope=php81-fpm-vipsffmpeg-nginx,mode=max
context: ./build/php82/fpm/vipsffmpeg-nginx
file: ./build/php82/fpm/vipsffmpeg-nginx/Dockerfile
cache-from: type=gha,scope=php82-fpm-vipsffmpeg-nginx
cache-to: type=gha,scope=php82-fpm-vipsffmpeg-nginx,mode=max
push: true
tags: anzusystems/php:${{ github.ref_name }}-php81-fpm-vipsffmpeg-nginx,anzusystems/php:latest-php81-fpm-vipsffmpeg-nginx
tags: anzusystems/php:${{ github.ref_name }}-php82-fpm-vipsffmpeg-nginx,anzusystems/php:latest-php82-fpm-vipsffmpeg-nginx

php82-cli-base:
name: Build and push php82 cli base image
php83-cli-base:
name: Build and push php83 cli base image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -110,15 +110,15 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./build/php82/cli/base
file: ./build/php82/cli/base/Dockerfile
cache-from: type=gha,scope=php82-cli
cache-to: type=gha,scope=php82-cli,mode=max
context: ./build/php83/cli/base
file: ./build/php83/cli/base/Dockerfile
cache-from: type=gha,scope=php83-cli
cache-to: type=gha,scope=php83-cli,mode=max
push: true
tags: anzusystems/php:${{ github.ref_name }}-php82-cli,anzusystems/php:latest-php82-cli
tags: anzusystems/php:${{ github.ref_name }}-php83-cli,anzusystems/php:latest-php83-cli

php82-cli-vipsffmpeg:
name: Build and push php82 cli vipsffmpeg image
php83-cli-vipsffmpeg:
name: Build and push php83 cli vipsffmpeg image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -136,15 +136,15 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./build/php82/cli/vipsffmpeg
file: ./build/php82/cli/vipsffmpeg/Dockerfile
cache-from: type=gha,scope=php82-cli-vipsffmpeg
cache-to: type=gha,scope=php82-cli-vipsffmpeg,mode=max
context: ./build/php83/cli/vipsffmpeg
file: ./build/php83/cli/vipsffmpeg/Dockerfile
cache-from: type=gha,scope=php83-cli-vipsffmpeg
cache-to: type=gha,scope=php83-cli-vipsffmpeg,mode=max
push: true
tags: anzusystems/php:${{ github.ref_name }}-php82-cli-vipsffmpeg,anzusystems/php:latest-php82-cli-vipsffmpeg
tags: anzusystems/php:${{ github.ref_name }}-php83-cli-vipsffmpeg,anzusystems/php:latest-php83-cli-vipsffmpeg

php82-fpm-vipsffmpeg-nginx:
name: Build and push php82 fpm vipsffmpeg-nginx image
php83-fpm-vipsffmpeg-nginx:
name: Build and push php83 fpm vipsffmpeg-nginx image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -162,10 +162,10 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./build/php82/fpm/vipsffmpeg-nginx
file: ./build/php82/fpm/vipsffmpeg-nginx/Dockerfile
cache-from: type=gha,scope=php82-fpm-vipsffmpeg-nginx
cache-to: type=gha,scope=php82-fpm-vipsffmpeg-nginx,mode=max
context: ./build/php83/fpm/vipsffmpeg-nginx
file: ./build/php83/fpm/vipsffmpeg-nginx/Dockerfile
cache-from: type=gha,scope=php83-fpm-vipsffmpeg-nginx
cache-to: type=gha,scope=php83-fpm-vipsffmpeg-nginx,mode=max
push: true
tags: anzusystems/php:${{ github.ref_name }}-php82-fpm-vipsffmpeg-nginx,anzusystems/php:latest-php82-fpm-vipsffmpeg-nginx
tags: anzusystems/php:${{ github.ref_name }}-php83-fpm-vipsffmpeg-nginx,anzusystems/php:latest-php83-fpm-vipsffmpeg-nginx

19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@ Additionally, it has preinstalled some libraries (xdebug, libvips, redis, mongod

## What's inside

- PHP8.1 - 8.1.24
- PHP8.2 - 8.2.11
- PHP Mongodb ext - 1.16.2
- PHP Redis ext - 5.3.7
- PHP 8.2 - 8.2.13
- PHP 8.3 - 8.3.0
- PHP Apcu ext - 5.1.23
- PHP Mongodb ext - 1.17.1
- PHP Redis ext - 6.0.2
- PHP Pcov ext - 1.0.11
- PHP Xdebug ext - 3.2.2
- PHP Xdebug ext - 3.3.1
- Redis (client) - 6.2.13
- Supervisor - 4.2.5
- Composer - 2.6.4
- Composer - 2.6.6
- Vipsffmpeg variant:
- PHP Vips ext - 1.0.13
- FFmpeg - 5.1.3
- LibVips - 8.14.5
- FFmpeg - 5.1.4
- LibVips - 8.15.1
- Nginx variant:
- Nginx - 1.24.0
- Nginx-xslt - 1.24.0
- Nginx-geoip - 1.24.0
- Nginx-image-filter - 1.24.0
- Nginx-njs - 0.8.1
- Nginx-njs - 0.8.2

### Special common commands

Expand Down
39 changes: 22 additions & 17 deletions build/php82/cli/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY!
# CHECK README FOR MORE INFO.
#
FROM php:8.2.11-cli
FROM php:8.2.13-cli

LABEL maintainer="Lubomir Stanko <[email protected]>"

Expand Down Expand Up @@ -107,6 +107,7 @@ RUN apt-get update && \
-o APT::AutoRemove::RecommendsImportant=false \
${BUILD_DEPS} \
${PECL_BUILD_DEPS} && \
# Cleanup
apt-get clean && \
rm -r /var/lib/apt/lists/* && \
rm -f /usr/local/etc/php-fpm.d/docker.conf && \
Expand All @@ -118,11 +119,13 @@ RUN apt-get update && \
RUN apt-get update && \
apt-get install -y \
${PECL_BUILD_DEPS} && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install mongodb-1.16.2 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install apcu-5.1.23 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install mongodb-1.17.1 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install pcov-1.0.11 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install redis-5.3.7 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install xdebug-3.2.2 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install redis-6.0.2 && \
yes '' | MAKEFLAGS="-j$(($(nproc)+2))" pecl install xdebug-3.3.1 && \
docker-php-ext-enable \
apcu \
mongodb \
pcov \
redis \
Expand All @@ -134,8 +137,10 @@ RUN apt-get update && \
-y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
${PECL_BUILD_DEPS} && \
# Cleanup
apt-get clean && \
rm -r /var/lib/apt/lists/*

# ----------------------------------------------------------------------------------------------------------------------
# PHP SECURITY CHECKER
# ----------------------------------------------------------------------------------------------------------------------
Expand All @@ -152,21 +157,21 @@ RUN curl -sS https://getcomposer.org/installer | \
php -- \
--install-dir=/usr/local/bin \
--filename=composer \
--version=2.6.4
--version=2.6.6

# ----------------------------------------------------------------------------------------------------------------------
# REDIS-CLI
# ----------------------------------------------------------------------------------------------------------------------
RUN wget https://download.redis.io/releases/redis-6.2.13.tar.gz && \
tar xvzf redis-6.2.13.tar.gz && \
rm -f redis-6.2.13.tar.gz && \
cd redis-6.2.13/deps && \
make && \
cd .. && \
make && \
cp src/redis-cli /usr/bin/ && \
cd .. && \
rm -rf redis-6.2.13
# REDIS-TOOLS
# ----------------------------------------------------------------------------------------------------------------------
RUN DEBIAN_FRONTEND=noninteractive && \
REDIS_KEYRING=/usr/share/keyrings/redis-archive-keyring.gpg && \
REDIS_REPO="$(lsb_release -c -s)" && \
curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o ${REDIS_KEYRING} && \
echo "deb [signed-by=${REDIS_KEYRING}] https://packages.redis.io/deb ${REDIS_REPO} main" > /etc/apt/sources.list.d/redis.list && \
apt-get update && \
apt-get install -y redis-tools=6:6.2.13-1rl1~bookworm1 && \
# Cleanup
apt-get clean && \
rm -r /var/lib/apt/lists/*

##<autogenerated>##
##</autogenerated>##
Expand Down
2 changes: 1 addition & 1 deletion build/php82/cli/base/usr/local/bin/create-user
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Script to create user with provided UID and GID and fix permissions for folders
# Script used to create user with provided UID and GID and fix permissions for folders
set -euo pipefail

USER_UID=${1:-1000}
Expand Down
2 changes: 1 addition & 1 deletion build/php82/cli/base/usr/local/bin/cron-cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Cron script wrapper to run command with multiple options
# Cron script wrapper used to run command with multiple options
set -euo pipefail

CRON_LOG_LEVEL="${CRON_LOG_LEVEL:-warn}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Script to generate messenger supervisor conf files inside the container
# Script used to generate messenger supervisor conf files inside the container
set -euo pipefail

# Messenger configuration
Expand Down
Loading

0 comments on commit f4406b6

Please sign in to comment.