for images with AWS library support add simplexml module and only for the S2 one also add the recommended curl one

This commit is contained in:
El RIDO 2023-01-03 19:57:33 +01:00
parent 658e52c2f0
commit 36318e1b6a
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
FROM alpine:3.17.0
ARG ALPINE_PACKAGES="php81-pdo_mysql php81-pdo_pgsql php81-openssl"
ARG ALPINE_PACKAGES="php81-pdo_mysql php81-pdo_pgsql php81-openssl php81-simplexml"
ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage"
ARG PBURL=https://github.com/PrivateBin/PrivateBin/
ARG RELEASE=1.5.1
@ -22,7 +22,10 @@ RUN \
ALPINE_PACKAGES="$(echo ${ALPINE_PACKAGES} | sed 's/,/ /g')" ;\
ALPINE_COMPOSER_PACKAGES="" ;\
if [ -n "${COMPOSER_PACKAGES}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php81-curl php81-mbstring php81-phar" ;\
ALPINE_COMPOSER_PACKAGES="php81-mbstring php81-phar" ;\
if [ -n "${ALPINE_PACKAGES##*php81-curl*}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php81-curl ${ALPINE_COMPOSER_PACKAGES}" ;\
fi ;\
RAWURL="$(echo ${PBURL} | sed s/github.com/raw.githubusercontent.com/)" ;\
fi \
# Install dependencies

View file

@ -63,7 +63,7 @@ main() {
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-pdo_mysql,php81-pdo_pgsql --build-arg COMPOSER_PACKAGES="
;;
s3)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-openssl --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php81-curl,php81-openssl,php81-simplexml --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
;;
*)
BUILD_ARGS=""