Compare commits
16 commits
1.7.4-alpi
...
master
Author | SHA1 | Date | |
---|---|---|---|
d104b4f3b1 | |||
|
606baa89c9 | ||
|
4cec4761ef | ||
|
53489980c1 | ||
|
e296cba5d6 | ||
|
1cd8f44849 | ||
|
8d911cbd2a | ||
|
5cae408aee | ||
|
eaa8107aca | ||
|
c2f338790d | ||
|
53c3e60b9b | ||
|
3ede9d518e | ||
|
e7959a773f | ||
|
960be2c980 | ||
|
6a5de49db3 | ||
|
f8e50740ee |
6 changed files with 24 additions and 20 deletions
2
.github/workflows/owasp.yml
vendored
2
.github/workflows/owasp.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
|
||||
# Run OWASP scan
|
||||
- name: OWASP ZAP Full Scan
|
||||
uses: zaproxy/action-full-scan@v0.10.0
|
||||
uses: zaproxy/action-full-scan@v0.12.0
|
||||
with:
|
||||
# GitHub Token to create issues in the repository
|
||||
#token: # optional, default is ${{ github.token }}
|
||||
|
|
26
Dockerfile
26
Dockerfile
|
@ -1,9 +1,9 @@
|
|||
FROM alpine:3.20.1
|
||||
FROM alpine:3.21
|
||||
|
||||
ARG ALPINE_PACKAGES="php83-iconv php83-pdo_mysql php83-pdo_pgsql php83-openssl php83-simplexml"
|
||||
ARG ALPINE_PACKAGES="php84-iconv php84-pdo_mysql php84-pdo_pgsql php84-openssl php84-simplexml"
|
||||
ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage"
|
||||
ARG PBURL=https://github.com/PrivateBin/PrivateBin/
|
||||
ARG RELEASE=1.7.4
|
||||
ARG RELEASE=1.7.6
|
||||
ARG UID=65534
|
||||
ARG GID=82
|
||||
|
||||
|
@ -24,6 +24,7 @@ RUN \
|
|||
ALPINE_PACKAGES="$(echo ${ALPINE_PACKAGES} | sed 's/,/ /g')" ;\
|
||||
ALPINE_COMPOSER_PACKAGES="" ;\
|
||||
if [ -n "${COMPOSER_PACKAGES}" ] ; then \
|
||||
# we need these PHP 8.3 packages until composer gets updated to depend on PHP 8.4
|
||||
ALPINE_COMPOSER_PACKAGES="composer" ;\
|
||||
if [ -n "${ALPINE_PACKAGES##*php83-curl*}" ] ; then \
|
||||
ALPINE_COMPOSER_PACKAGES="php83-curl ${ALPINE_COMPOSER_PACKAGES}" ;\
|
||||
|
@ -31,15 +32,18 @@ RUN \
|
|||
if [ -n "${ALPINE_PACKAGES##*php83-mbstring*}" ] ; then \
|
||||
ALPINE_COMPOSER_PACKAGES="php83-mbstring ${ALPINE_COMPOSER_PACKAGES}" ;\
|
||||
fi ;\
|
||||
if [ -z "${ALPINE_PACKAGES##*php84-simplexml*}" ] ; then \
|
||||
ALPINE_COMPOSER_PACKAGES="php83-simplexml ${ALPINE_COMPOSER_PACKAGES}" ;\
|
||||
fi ;\
|
||||
fi \
|
||||
# Install dependencies
|
||||
&& apk upgrade --no-cache \
|
||||
&& apk add --no-cache gnupg git nginx php83 php83-ctype php83-fpm php83-gd \
|
||||
php83-opcache s6 tzdata ${ALPINE_PACKAGES} ${ALPINE_COMPOSER_PACKAGES} \
|
||||
&& apk add --no-cache gnupg git nginx php84 php84-ctype php84-fpm php84-gd \
|
||||
php84-opcache s6 tzdata ${ALPINE_PACKAGES} ${ALPINE_COMPOSER_PACKAGES} \
|
||||
# Stabilize php config location
|
||||
&& mv /etc/php83 /etc/php \
|
||||
&& ln -s /etc/php /etc/php83 \
|
||||
&& ln -s $(which php83) /usr/local/bin/php \
|
||||
&& mv /etc/php84 /etc/php \
|
||||
&& ln -s /etc/php /etc/php84 \
|
||||
&& ln -s $(which php84) /usr/local/bin/php \
|
||||
# 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 -rf /etc/nginx/sites-* \
|
||||
|
@ -75,10 +79,10 @@ RUN \
|
|||
&& mkdir -p /srv/data \
|
||||
&& sed -i "s#define('PATH', '');#define('PATH', '/srv/');#" index.php \
|
||||
# Support running s6 under a non-root user
|
||||
&& mkdir -p /etc/s6/services/nginx/supervise /etc/s6/services/php-fpm83/supervise \
|
||||
&& mkdir -p /etc/s6/services/nginx/supervise /etc/s6/services/php-fpm84/supervise \
|
||||
&& mkfifo \
|
||||
/etc/s6/services/nginx/supervise/control \
|
||||
/etc/s6/services/php-fpm83/supervise/control \
|
||||
/etc/s6/services/php-fpm84/supervise/control \
|
||||
&& chown -R ${UID}:${GID} /etc/s6 /run /srv/* /var/lib/nginx /var/www \
|
||||
&& chmod o+rwx /run /var/lib/nginx /var/lib/nginx/tmp \
|
||||
# Clean up
|
||||
|
@ -93,7 +97,7 @@ WORKDIR /var/www
|
|||
USER ${UID}:${GID}
|
||||
|
||||
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
||||
VOLUME /run /srv/data /tmp /var/lib/nginx/tmp
|
||||
VOLUME /run /srv/data /srv/img /tmp /var/lib/nginx/tmp
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ Options:
|
|||
-p, --purge purge all expired pastes
|
||||
-s, --statistics reads all stored pastes and comments and reports statistics
|
||||
|
||||
docker exec -t privatebin migrate --help
|
||||
$ docker exec -t privatebin migrate --help
|
||||
migrate - Copy data between PrivateBin backends
|
||||
|
||||
Usage:
|
||||
|
@ -221,9 +221,9 @@ Options:
|
|||
-h, --help displays this help message
|
||||
-n dry run, do not copy data
|
||||
-v be verbose
|
||||
<srcconfdir> use storage backend configration from conf.php found in
|
||||
<srcconfdir> use storage backend configuration from conf.php found in
|
||||
this directory as source
|
||||
<dstconfdir> optionally, use storage backend configration from conf.php
|
||||
<dstconfdir> optionally, use storage backend configuration from conf.php
|
||||
found in this directory as destination; defaults to:
|
||||
/srv/bin/../cfg/conf.php
|
||||
```
|
||||
|
|
|
@ -52,13 +52,13 @@ main() {
|
|||
BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES="
|
||||
;;
|
||||
gcs)
|
||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php83-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage"
|
||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php84-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage"
|
||||
;;
|
||||
pdo)
|
||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php83-pdo_mysql,php83-pdo_pgsql --build-arg COMPOSER_PACKAGES="
|
||||
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php84-pdo_mysql,php84-pdo_pgsql --build-arg COMPOSER_PACKAGES="
|
||||
;;
|
||||
s3)
|
||||
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-arg ALPINE_PACKAGES=php84-curl,php84-mbstring,php84-openssl,php84-simplexml --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
|
||||
;;
|
||||
*)
|
||||
BUILD_ARGS=""
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/execlineb -P
|
||||
foreground { cp -r /etc/s6/services /run }
|
||||
/bin/s6-svscan /run/services
|
||||
s6-svscan /run/services
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/execlineb -P
|
||||
/usr/sbin/php-fpm83
|
||||
/usr/sbin/php-fpm84
|
Loading…
Add table
Add a link
Reference in a new issue