Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
41 changes: 41 additions & 0 deletions .github/workflows/multiarch-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Multiarch build

on:
push:
branches:
- '**'
schedule:
# Every month's 2nd on 5:30
- cron: '30 5 2 * *'

jobs:
multiarch-build:
name: Build images
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static

- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: php
tags: latest
platforms: linux/amd64, linux/arm64
containerfiles: Containerfile

- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
if: github.ref == 'refs/heads/master'
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/wavesoftware
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
108 changes: 44 additions & 64 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,66 +1,46 @@
FROM docker.io/library/php:8-fpm
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libxml2-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libmemcached-dev \
libpq-dev \
libzip-dev \
libgmp-dev \
rsync \
bzip2 \
busybox-static \
libmagickwand-dev \
imagemagick
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg
RUN docker-php-ext-configure ldap --with-libdir="lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"
RUN docker-php-ext-install \
iconv \
mysqli \
exif \
gd \
intl \
ldap \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
zip \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
gettext \
bcmath \
sysvsem \
gmp
RUN yes '' | pecl install imagick
RUN yes '' | pecl install apcu
RUN yes '' | pecl install memcached
RUN yes '' | pecl install redis
RUN yes '' | pecl install mcrypt
RUN docker-php-ext-enable \
apcu \
memcached \
redis \
mcrypt \
imagick
RUN apt-get update && apt-get upgrade -y && apt-get autoclean

ADD --chmod=0755 \
https://github.com/mlocati/docker-php-extension-installer/releases/download/2.6.3/install-php-extensions \
/usr/local/bin/

RUN install-php-extensions \
apcu \
bcmath \
curl \
exif \
filter \
gd \
gettext \
gmp \
iconv \
# TODO: Use latest released version, after https://github.com/Imagick/imagick/issues/640 is fixed
imagick/imagick@28f27044e435a2b203e32675e942eb8de620ee58 \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unpin this when Imagick/imagick#640 is fixed

intl \
ldap \
mbstring \
mcrypt \
memcached \
mysqli \
opcache \
pcntl \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
redis \
sysvsem \
zip

RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini && \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini && \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini && \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini && \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini