commit
de2e5dd5a2
5 changed files with 18 additions and 21 deletions
2
.github/workflows/build-images.yml
vendored
2
.github/workflows/build-images.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le
|
platforms: linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
|
|
24
Dockerfile
24
Dockerfile
|
@ -1,6 +1,6 @@
|
||||||
FROM alpine:3.19.0
|
FROM alpine:3.19.0
|
||||||
|
|
||||||
ARG ALPINE_PACKAGES="php82-iconv php82-pdo_mysql php82-pdo_pgsql php82-openssl php82-simplexml"
|
ARG ALPINE_PACKAGES="php83-iconv php83-pdo_mysql php83-pdo_pgsql php83-openssl php83-simplexml"
|
||||||
ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage"
|
ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage"
|
||||||
ARG PBURL=https://github.com/PrivateBin/PrivateBin/
|
ARG PBURL=https://github.com/PrivateBin/PrivateBin/
|
||||||
ARG RELEASE=1.6.1
|
ARG RELEASE=1.6.1
|
||||||
|
@ -24,23 +24,23 @@ RUN \
|
||||||
ALPINE_PACKAGES="$(echo ${ALPINE_PACKAGES} | sed 's/,/ /g')" ;\
|
ALPINE_PACKAGES="$(echo ${ALPINE_PACKAGES} | sed 's/,/ /g')" ;\
|
||||||
ALPINE_COMPOSER_PACKAGES="" ;\
|
ALPINE_COMPOSER_PACKAGES="" ;\
|
||||||
if [ -n "${COMPOSER_PACKAGES}" ] ; then \
|
if [ -n "${COMPOSER_PACKAGES}" ] ; then \
|
||||||
ALPINE_COMPOSER_PACKAGES="php82-phar" ;\
|
ALPINE_COMPOSER_PACKAGES="php83-phar" ;\
|
||||||
if [ -n "${ALPINE_PACKAGES##*php82-curl*}" ] ; then \
|
if [ -n "${ALPINE_PACKAGES##*php83-curl*}" ] ; then \
|
||||||
ALPINE_COMPOSER_PACKAGES="php82-curl ${ALPINE_COMPOSER_PACKAGES}" ;\
|
ALPINE_COMPOSER_PACKAGES="php83-curl ${ALPINE_COMPOSER_PACKAGES}" ;\
|
||||||
fi ;\
|
fi ;\
|
||||||
if [ -n "${ALPINE_PACKAGES##*php82-mbstring*}" ] ; then \
|
if [ -n "${ALPINE_PACKAGES##*php83-mbstring*}" ] ; then \
|
||||||
ALPINE_COMPOSER_PACKAGES="php82-mbstring ${ALPINE_COMPOSER_PACKAGES}" ;\
|
ALPINE_COMPOSER_PACKAGES="php83-mbstring ${ALPINE_COMPOSER_PACKAGES}" ;\
|
||||||
fi ;\
|
fi ;\
|
||||||
RAWURL="$(echo ${PBURL} | sed s/github.com/raw.githubusercontent.com/)" ;\
|
RAWURL="$(echo ${PBURL} | sed s/github.com/raw.githubusercontent.com/)" ;\
|
||||||
fi \
|
fi \
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
&& apk upgrade --no-cache \
|
&& apk upgrade --no-cache \
|
||||||
&& apk add --no-cache gnupg git nginx php82 php82-fpm php82-gd php82-opcache \
|
&& apk add --no-cache gnupg git nginx php83 php83-fpm php83-gd php83-opcache \
|
||||||
s6 tzdata ${ALPINE_PACKAGES} ${ALPINE_COMPOSER_PACKAGES} \
|
s6 tzdata ${ALPINE_PACKAGES} ${ALPINE_COMPOSER_PACKAGES} \
|
||||||
# Stabilize php config location
|
# Stabilize php config location
|
||||||
&& mv /etc/php82 /etc/php \
|
&& mv /etc/php83 /etc/php \
|
||||||
&& ln -s /etc/php /etc/php82 \
|
&& ln -s /etc/php /etc/php83 \
|
||||||
&& ln -s $(which php82) /usr/local/bin/php \
|
&& ln -s $(which php83) /usr/local/bin/php \
|
||||||
# Remove (some of the) default nginx & php config
|
# Remove (some of the) default nginx & php config
|
||||||
&& rm -f /etc/nginx.conf /etc/nginx/http.d/default.conf /etc/php/php-fpm.d/www.conf \
|
&& rm -f /etc/nginx.conf /etc/nginx/http.d/default.conf /etc/php/php-fpm.d/www.conf \
|
||||||
&& rm -rf /etc/nginx/sites-* \
|
&& rm -rf /etc/nginx/sites-* \
|
||||||
|
@ -81,10 +81,10 @@ RUN \
|
||||||
&& mkdir -p /srv/data \
|
&& mkdir -p /srv/data \
|
||||||
&& sed -i "s#define('PATH', '');#define('PATH', '/srv/');#" index.php \
|
&& sed -i "s#define('PATH', '');#define('PATH', '/srv/');#" index.php \
|
||||||
# Support running s6 under a non-root user
|
# Support running s6 under a non-root user
|
||||||
&& mkdir -p /etc/s6/services/nginx/supervise /etc/s6/services/php-fpm82/supervise \
|
&& mkdir -p /etc/s6/services/nginx/supervise /etc/s6/services/php-fpm83/supervise \
|
||||||
&& mkfifo \
|
&& mkfifo \
|
||||||
/etc/s6/services/nginx/supervise/control \
|
/etc/s6/services/nginx/supervise/control \
|
||||||
/etc/s6/services/php-fpm82/supervise/control \
|
/etc/s6/services/php-fpm83/supervise/control \
|
||||||
&& chown -R ${UID}:${GID} /etc/s6 /run /srv/* /var/lib/nginx /var/www \
|
&& chown -R ${UID}:${GID} /etc/s6 /run /srv/* /var/lib/nginx /var/www \
|
||||||
&& chmod o+rwx /run /var/lib/nginx /var/lib/nginx/tmp \
|
&& chmod o+rwx /run /var/lib/nginx /var/lib/nginx/tmp \
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
|
@ -22,7 +22,7 @@ build_image() {
|
||||||
push_image() {
|
push_image() {
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le \
|
--platform linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
|
||||||
--pull \
|
--pull \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--push \
|
--push \
|
||||||
|
@ -52,13 +52,13 @@ main() {
|
||||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES="
|
BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES="
|
||||||
;;
|
;;
|
||||||
gcs)
|
gcs)
|
||||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php82-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage"
|
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php83-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage"
|
||||||
;;
|
;;
|
||||||
pdo)
|
pdo)
|
||||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php82-pdo_mysql,php82-pdo_pgsql --build-arg COMPOSER_PACKAGES="
|
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php83-pdo_mysql,php83-pdo_pgsql --build-arg COMPOSER_PACKAGES="
|
||||||
;;
|
;;
|
||||||
s3)
|
s3)
|
||||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php82-curl,php82-mbstring,php82-openssl,php82-simplexml --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
|
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php83-curl,php83-mbstring,php83-openssl,php83-simplexml --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
BUILD_ARGS=""
|
BUILD_ARGS=""
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
; fixation via session adoption with strict mode. Defaults to 0 (disabled).
|
; fixation via session adoption with strict mode. Defaults to 0 (disabled).
|
||||||
session.use_strict_mode=On
|
session.use_strict_mode=On
|
||||||
|
|
||||||
; Enable assert() evaluation.
|
|
||||||
assert.active=Off
|
|
||||||
|
|
||||||
; This determines whether errors should be printed to the screen as part of the output or if they
|
; This determines whether errors should be printed to the screen as part of the output or if they
|
||||||
; should be hidden from the user. Value "stderr" sends the errors to stderr instead of stdout.
|
; should be hidden from the user. Value "stderr" sends the errors to stderr instead of stdout.
|
||||||
display_errors=Off
|
display_errors=Off
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/execlineb -P
|
#!/bin/execlineb -P
|
||||||
/usr/sbin/php-fpm82
|
/usr/sbin/php-fpm83
|
Loading…
Add table
Add a link
Reference in a new issue