Initial commit - PHP 8.2 image
Test / test_build (push) Successful in 5s Details
Release / build_push (push) Successful in 13s Details

master
Gertjan Krol 2023-05-28 21:22:57 +02:00
commit 0eb40826ad
5 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,22 @@
name: Release
on:
push:
tags:
- '*'
jobs:
build_push:
runs-on: ubuntu-latest
container: git.gertjankrol.nl/docker/toolkit:latest
env:
REGISTRY: git.gertjankrol.nl
IMAGE_NAMESPACE: docker/php
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Docker login
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} https://${REGISTRY}
- name: Build and push containers
run: |
docker build . -t ${REGISTRY}/${IMAGE_NAMESPACE}:${{ github.ref_name }} --push
docker build . -f Dockerfile-fpm -t ${REGISTRY}/${IMAGE_NAMESPACE}:${{ github.ref_name }}-fpm --push

View File

@ -0,0 +1,21 @@
name: Test
on:
push:
branches:
- '*'
jobs:
test_build:
runs-on: ubuntu-latest
container: git.gertjankrol.nl/docker/toolkit:latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Build containers
run: |
docker build . -t php-test:${{ github.ref_name }}
docker build . -f Dockerfile-fpm -t php-test:${{ github.ref_name }}-fpm
- name: Default image details
run: docker image inspect php-test:${{ github.ref_name }}
- name: FPM image details
run: docker image inspect php-test:${{ github.ref_name }}-fpm

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM php:8.2-alpine AS php-system-setup
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY --from=mlocati/php-extension-installer:2 /usr/bin/install-php-extensions /usr/bin/
RUN install-php-extensions bcmath curl mbstring fileinfo gd intl mysqli opcache openssl pcntl pdo_mysql posix redis uuid zip
COPY --from=composer/composer:2 /usr/bin/composer /usr/local/bin/

7
Dockerfile-fpm Normal file
View File

@ -0,0 +1,7 @@
FROM php:8.2-fpm-alpine AS php-system-setup
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY --from=mlocati/php-extension-installer:2 /usr/bin/install-php-extensions /usr/bin/
RUN install-php-extensions bcmath curl mbstring fileinfo gd intl mysqli opcache openssl pcntl pdo_mysql posix redis uuid zip
COPY --from=composer/composer:2 /usr/bin/composer /usr/local/bin/

2
README.md Normal file
View File

@ -0,0 +1,2 @@
## PHP Docker image
> Includes Composer and some common extensions