Skip to content

Commit

Permalink
Add php8.2 version of container
Browse files Browse the repository at this point in the history
  • Loading branch information
Church13 committed Oct 7, 2023
1 parent 4036072 commit 9d3c9c0
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/docker-php8.2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
schedule:
- cron: '15 15 * * 1'
push:
branches: [ main ]
# Publish semver tags as releases.
pull_request:
branches: [ main ]
workflow_dispatch:

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Copy custom.ini into container
run: |
cp custom.ini ./php8.2/custom.ini

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
php8.2

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./php8.2/
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
12 changes: 12 additions & 0 deletions php8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM wordpress:php8.2

RUN pecl install redis && \
docker-php-ext-enable redis

RUN apt-get update && apt-get install -y libxml2-dev

RUN docker-php-ext-install soap

COPY custom.ini $PHP_INI_DIR/conf.d/

USER www-data:www-data

0 comments on commit 9d3c9c0

Please sign in to comment.