From ce58ceb146e67bccb69a5aa6319cb256015fbdc7 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 22 Oct 2022 18:13:11 +0200 Subject: [PATCH] add an S3 storage variant image --- Dockerfile | 2 +- README.md | 3 ++- README.s3.md | 7 +++++++ buildx.sh | 7 +++++-- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 README.s3.md diff --git a/Dockerfile b/Dockerfile index f04da76..95ba6b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.16.2 ARG ALPINE_PACKAGES="php8-pdo_mysql php8-pdo_pgsql php8-openssl" -ARG COMPOSER_PACKAGES=google/cloud-storage +ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage" ARG PBURL=https://github.com/PrivateBin/PrivateBin/ ARG RELEASE=1.4.0 ARG UID=65534 diff --git a/README.md b/README.md index 666719a..9fbc133 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,11 @@ This repository contains the Dockerfile and resources needed to create a docker ## Image variants -This is the all-in-one image that can be used with any storage backend supported by PrivateBin: File based storage, database or Google Cloud Storage. We also offer dedicated images for each backend: +This is the all-in-one image that can be used with any storage backend supported by PrivateBin: File based storage, databases, Google Cloud or S3 Storage. We also offer dedicated images for each backend: - [Image for file based storage](https://hub.docker.com/r/privatebin/fs) - [Image for PostgreSQL, MariaDB & MySQL](https://hub.docker.com/r/privatebin/pdo) - [Image for Google Cloud Storage](https://hub.docker.com/r/privatebin/gcs) +- [Image for S3 Storage](https://hub.docker.com/r/privatebin/s3) ## Image tags diff --git a/README.s3.md b/README.s3.md new file mode 100644 index 0000000..269aa2d --- /dev/null +++ b/README.s3.md @@ -0,0 +1,7 @@ +# PrivateBin on Nginx, php-fpm & Alpine with S3 Storage backend + +**PrivateBin** is a minimalist, open source online [pastebin](https://en.wikipedia.org/wiki/Pastebin) where the server has zero knowledge of pasted data. Data is encrypted and decrypted in the browser using 256bit AES in [Galois Counter mode](https://en.wikipedia.org/wiki/Galois/Counter_Mode). + +## Image variants + +This is an image optimized for the S3 Storage backend. Please see the [generic image](https://hub.docker.com/r/privatebin/nginx-fpm-alpine) for details on how to use this image, other images variants and the different tags. diff --git a/buildx.sh b/buildx.sh index b5bcb1a..49ee0ea 100755 --- a/buildx.sh +++ b/buildx.sh @@ -56,11 +56,14 @@ main() { fs) BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES=" ;; + gcs) + BUILD_ARGS="--build-arg ALPINE_PACKAGES=php8-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage" + ;; pdo) BUILD_ARGS="--build-arg ALPINE_PACKAGES=php8-pdo_mysql,php8-pdo_pgsql --build-arg COMPOSER_PACKAGES=" ;; - gcs) - BUILD_ARGS="--build-arg ALPINE_PACKAGES=php8-openssl" + s3) + BUILD_ARGS="--build-arg ALPINE_PACKAGES=php8-openssl --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php" ;; *) BUILD_ARGS=""