Compare commits

...

10 commits

Author SHA1 Message Date
nikurasu afe31f6132
Add sqlite support
Sqlite3 support added again with pdo
2023-12-22 17:58:21 +01:00
El RIDO 65ceef0130
Merge pull request #180 from PrivateBin/dependabot/github_actions/github/codeql-action-3
Bump github/codeql-action from 2 to 3
2023-12-15 08:13:28 +01:00
El RIDO df9b030944
new release 1.6.2 2023-12-15 07:25:53 +01:00
dependabot[bot] 03d37db311
Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 05:42:54 +00:00
El RIDO de2e5dd5a2
Merge pull request #178 from PrivateBin/php83
upgrade to PHP 8.3
2023-12-09 16:25:01 +01:00
El RIDO d8412a1a04
enable building on s390 arch 2023-12-09 13:51:56 +01:00
El RIDO e6bcd5d5ea
remove deprecated, as of 8.3, option 2023-12-09 13:51:22 +01:00
El RIDO 8c00b28528
upgrade to PHP 8.3 2023-12-09 13:50:35 +01:00
El RIDO 4cae47e131
Merge pull request #177 from PrivateBin/dependabot/docker/alpine-3.19.0
Bump alpine from 3.18.5 to 3.19.0
2023-12-09 13:18:37 +01:00
dependabot[bot] c9d7a59aa4
Bump alpine from 3.18.5 to 3.19.0
Bumps alpine from 3.18.5 to 3.19.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 05:13:47 +00:00
7 changed files with 23 additions and 26 deletions

View file

@ -24,7 +24,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
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
uses: docker/setup-buildx-action@v3
with:

View file

@ -35,6 +35,6 @@ jobs:
image: privatebin/nginx-fpm-alpine
args: --file=Dockerfile
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif

View file

@ -30,6 +30,6 @@ jobs:
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'

View file

@ -1,9 +1,9 @@
FROM alpine:3.18.5
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_sqlite php83-pdo_mysql php83-pdo_pgsql php83-openssl php83-simplexml"
ARG COMPOSER_PACKAGES="aws/aws-sdk-php google/cloud-storage"
ARG PBURL=https://github.com/PrivateBin/PrivateBin/
ARG RELEASE=1.6.1
ARG PBURL=https://dev.cat-enby.club/Nikurasu/docker-nginx-fpm-alpine
ARG RELEASE=1.6.2
ARG UID=65534
ARG GID=82
@ -24,23 +24,23 @@ RUN \
ALPINE_PACKAGES="$(echo ${ALPINE_PACKAGES} | sed 's/,/ /g')" ;\
ALPINE_COMPOSER_PACKAGES="" ;\
if [ -n "${COMPOSER_PACKAGES}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php82-phar" ;\
if [ -n "${ALPINE_PACKAGES##*php82-curl*}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php82-curl ${ALPINE_COMPOSER_PACKAGES}" ;\
ALPINE_COMPOSER_PACKAGES="php83-phar" ;\
if [ -n "${ALPINE_PACKAGES##*php83-curl*}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php83-curl ${ALPINE_COMPOSER_PACKAGES}" ;\
fi ;\
if [ -n "${ALPINE_PACKAGES##*php82-mbstring*}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php82-mbstring ${ALPINE_COMPOSER_PACKAGES}" ;\
if [ -n "${ALPINE_PACKAGES##*php83-mbstring*}" ] ; then \
ALPINE_COMPOSER_PACKAGES="php83-mbstring ${ALPINE_COMPOSER_PACKAGES}" ;\
fi ;\
RAWURL="$(echo ${PBURL} | sed s/github.com/raw.githubusercontent.com/)" ;\
fi \
# Install dependencies
&& 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} \
# Stabilize php config location
&& mv /etc/php82 /etc/php \
&& ln -s /etc/php /etc/php82 \
&& ln -s $(which php82) /usr/local/bin/php \
&& mv /etc/php83 /etc/php \
&& ln -s /etc/php /etc/php83 \
&& ln -s $(which php83) /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-* \
@ -81,10 +81,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-fpm82/supervise \
&& mkdir -p /etc/s6/services/nginx/supervise /etc/s6/services/php-fpm83/supervise \
&& mkfifo \
/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 \
&& chmod o+rwx /run /var/lib/nginx /var/lib/nginx/tmp \
# Clean up

View file

@ -22,7 +22,7 @@ build_image() {
push_image() {
# shellcheck disable=SC2068
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 \
--no-cache \
--push \
@ -52,13 +52,13 @@ main() {
BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES="
;;
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)
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)
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=""

View file

@ -4,9 +4,6 @@
; fixation via session adoption with strict mode. Defaults to 0 (disabled).
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
; should be hidden from the user. Value "stderr" sends the errors to stderr instead of stdout.
display_errors=Off

View file

@ -1,2 +1,2 @@
#!/bin/execlineb -P
/usr/sbin/php-fpm82
/usr/sbin/php-fpm83