Compare commits

...
Sign in to create a new pull request.

335 commits

Author SHA1 Message Date
d104b4f3b1 Update Dockerfile
Some checks failed
Security-scan / build (push) Has been cancelled
Shellcheck / Shellcheck (push) Has been cancelled
Build & Deploy container image / fs image / edge release (push) Has been cancelled
Build & Deploy container image / gcs image / edge release (push) Has been cancelled
Build & Deploy container image / nginx-fpm-alpine image / edge release (push) Has been cancelled
Build & Deploy container image / pdo image / edge release (push) Has been cancelled
Build & Deploy container image / s3 image / edge release (push) Has been cancelled
Build & Deploy container image / fs image / stable release (push) Has been cancelled
Build & Deploy container image / gcs image / stable release (push) Has been cancelled
Build & Deploy container image / nginx-fpm-alpine image / stable release (push) Has been cancelled
Build & Deploy container image / pdo image / stable release (push) Has been cancelled
Build & Deploy container image / s3 image / stable release (push) Has been cancelled
Snyk Container / snyk (push) Has been cancelled
trivy-analysis / Trivy analysis (push) Has been cancelled
2025-03-03 01:54:04 +00:00
El RIDO
606baa89c9
Merge pull request #211 from PrivateBin/php84
upgrade to PHP 8.4 packages
2025-02-01 14:17:30 +01:00
El RIDO
4cec4761ef
upgrade to PHP 8.4 packages
composer related packages need to stay at PHP 8.3 until the composer package gets upgrade in Alpine - they get removed again at the end of the image build
2025-02-01 12:02:25 +01:00
El RIDO
53489980c1
new release 1.7.6 2025-02-01 11:25:56 +01:00
El RIDO
e296cba5d6 Bump alpine from 3.20.3 to 3.21 2024-12-06 05:49:23 +01:00
El RIDO
1cd8f44849
Merge pull request #207 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.12.0
Bump zaproxy/action-full-scan from 0.11.0 to 0.12.0
2024-11-22 06:56:46 +01:00
dependabot[bot]
8d911cbd2a
Bump zaproxy/action-full-scan from 0.11.0 to 0.12.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 05:52:09 +00:00
El RIDO
5cae408aee
new release 1.7.5 2024-11-16 08:40:03 +01:00
El RIDO
eaa8107aca
Merge pull request #205 from PrivateBin/s6-usr-bin
with s6 2.13.1.0 binaries live in /usr/bin instead of /bin
2024-10-23 07:23:03 +02:00
El RIDO
c2f338790d
typo in usage 2024-10-19 10:56:16 +02:00
El RIDO
53c3e60b9b
with s6 2.13.1.0 binaries live in /usr/bin instead of /bin
this change makes the entrypoint script PATH dependent, but agnostic to the real location of the s6-svcscan binary, so it work both for alpine 3.20 as well as edge / future stable alpine releases

see d348893ddf (bc2914fbfe731ad6ff1eb5c019c39433c87bcaf5_22_24)
2024-10-19 10:11:19 +02:00
El RIDO
3ede9d518e
Merge pull request #202 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.11.0
Bump zaproxy/action-full-scan from 0.10.0 to 0.11.0
2024-09-26 08:34:50 +02:00
dependabot[bot]
e7959a773f
Bump zaproxy/action-full-scan from 0.10.0 to 0.11.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-26 05:13:24 +00:00
El RIDO
960be2c980
Merge pull request #201 from PrivateBin/dependabot/docker/alpine-3.20.3
Bump alpine from 3.20.2 to 3.20.3
2024-09-09 12:56:44 +02:00
dependabot[bot]
6a5de49db3
Bump alpine from 3.20.2 to 3.20.3
Bumps alpine from 3.20.2 to 3.20.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 05:44:22 +00:00
El RIDO
f8e50740ee Bump alpine from 3.20.1 to 3.20.2 2024-07-23 06:59:24 +02:00
El RIDO
9a6270cfd4
new release 1.7.4 2024-07-09 21:09:29 +02:00
El RIDO
ee4c8fe350 timezone vars are part of env vars 2024-06-21 12:46:41 +02:00
dependabot[bot]
652dea8c8c
Bump alpine from 3.20.0 to 3.20.1
Bumps alpine from 3.20.0 to 3.20.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-21 05:42:45 +00:00
El RIDO
fc508c9b37
Merge pull request #197 from PrivateBin/env-vars
enable custom env var passthrough & document usage
2024-06-14 07:08:23 +02:00
El RIDO
b71945e5e0
enable custom env var passthrough & document usage 2024-06-13 19:39:49 +02:00
El RIDO
beac0038fd
Merge pull request #195 from PrivateBin/alpine-3.20
Bump alpine from 3.19.1 to 3.20.0
2024-05-23 12:46:43 +02:00
El RIDO
bb09a19975 Bump alpine from 3.19.1 to 3.20.0
Also undo now obsolete 8.2 fix for #193, composer now is on the same PHP release as the rest
2024-05-23 07:24:03 +02:00
El RIDO
715fac27e8
new release 1.7.3 2024-05-13 19:34:40 +02:00
El RIDO
605ee7c378
Merge pull request #193 from PrivateBin/s3-composer-fixes
S3 image fixes
2024-05-12 10:56:09 +02:00
El RIDO
62bc1816e1
S3 image fixes #192
- only install composer if necessary
- if simplexml is requested, also install it for PHP 8.2, so composer can detect it
- unset composer platform config, it prevented later upgrades of GCP library
- removes unused RAWURL
2024-05-09 19:22:53 +02:00
El RIDO
7bb9a07b70
Merge branch 'master' into composer 2024-05-05 21:55:48 +02:00
El RIDO
a2cfbd8c07
new release 1.7.2 2024-05-05 21:50:49 +02:00
El RIDO
720c23edb8
Merge pull request #189 from PrivateBin/ctype
add ctype PHP extension
2024-04-15 15:30:48 +02:00
El RIDO
899260980d
Merge pull request #190 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.10.0
Bump zaproxy/action-full-scan from 0.9.0 to 0.10.0
2024-04-04 06:48:25 +02:00
dependabot[bot]
ff3d32df0f
Bump zaproxy/action-full-scan from 0.9.0 to 0.10.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:11:49 +00:00
El RIDO
e10c62ec57
add ctype PHP extension
this will become required with the next PrivateBin release (> 1.7.1), where we replaced some of the regex based validation with ctype function calls
2024-04-01 14:27:29 +02:00
El RIDO
5a4d7bab53
with composer config becoming part of the signed release archive, we no longer need to download them separately 2024-02-12 21:33:57 +01:00
El RIDO
77369792b5
switch to packaged composer 2024-02-12 21:24:17 +01:00
El RIDO
8c5df7cfdb
new release 1.7.1 2024-02-11 15:34:39 +01:00
El RIDO
7178d8fd15
new release 1.7.0 2024-02-11 14:31:12 +01:00
El RIDO
d5637bd03a
Merge pull request #186 from PrivateBin/dependabot/docker/alpine-3.19.1
Bump alpine from 3.19.0 to 3.19.1
2024-01-29 07:07:05 +01:00
dependabot[bot]
91ca54e9c1
Bump alpine from 3.19.0 to 3.19.1
Bumps alpine from 3.19.0 to 3.19.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 05:57:28 +00:00
El RIDO
f8a4b33782
Merge pull request #185 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.9.0
Bump zaproxy/action-full-scan from 0.8.0 to 0.9.0
2024-01-27 09:16:07 +01:00
dependabot[bot]
f3feea065e
Bump zaproxy/action-full-scan from 0.8.0 to 0.9.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 05:40:46 +00: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
El RIDO
19dde57d30
new release 1.6.1 2023-12-04 21:35:15 +01:00
El RIDO
afe8e8d22d
Merge pull request #175 from PrivateBin/rugk-patch-1
Simplify if condition in build script
2023-12-01 07:23:36 +01:00
El RIDO
729168d0d7
Merge pull request #176 from PrivateBin/dependabot/docker/alpine-3.18.5
Bump alpine from 3.18.4 to 3.18.5
2023-12-01 07:09:00 +01:00
dependabot[bot]
a9ac833cab
Bump alpine from 3.18.4 to 3.18.5
Bumps alpine from 3.18.4 to 3.18.5.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 05:18:44 +00:00
rugk
545a6dfd3a
Simplify if condition by using startsWith
Should now be equivalent to the previous one.
2023-11-18 17:15:07 +01:00
rugk
ac988f2a24
Simplify if condition in build script
The of condition likely was wrongly inverted (it said it would run if the branch was _not_ master).
Also it's kinda useless anyway, as the trigger definitions above (in `on`) already restrict the branches.
2023-11-03 12:01:24 +01:00
El RIDO
54165bb82e
Merge pull request #174 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.8.0
Bump zaproxy/action-full-scan from 0.7.0 to 0.8.0
2023-11-01 19:07:27 +01:00
dependabot[bot]
a96d9b8928
Bump zaproxy/action-full-scan from 0.7.0 to 0.8.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 05:41:43 +00:00
El RIDO
1ccce9fbbd
Merge pull request #172 from PrivateBin/dependabot/docker/alpine-3.18.4
Bump alpine from 3.18.3 to 3.18.4
2023-10-01 09:15:00 +02:00
dependabot[bot]
9928744bb3
Bump alpine from 3.18.3 to 3.18.4
Bumps alpine from 3.18.3 to 3.18.4.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 05:53:52 +00:00
El RIDO
d5561cd2ed
Merge pull request #171 from PrivateBin/dependabot/github_actions/docker/setup-buildx-action-3
Bump docker/setup-buildx-action from 2 to 3
2023-09-14 05:36:45 +02:00
dependabot[bot]
10f3a04035
Bump docker/setup-buildx-action from 2 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-14 03:34:59 +00:00
El RIDO
63992f5912
Merge pull request #170 from PrivateBin/dependabot/github_actions/docker/login-action-3
Bump docker/login-action from 2 to 3
2023-09-14 05:33:54 +02:00
El RIDO
3ae7f10303
Merge pull request #169 from PrivateBin/dependabot/github_actions/docker/setup-qemu-action-3
Bump docker/setup-qemu-action from 2 to 3
2023-09-14 05:33:15 +02:00
dependabot[bot]
050c2d3ecf
Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-13 05:50:03 +00:00
dependabot[bot]
8844becb94
Bump docker/setup-qemu-action from 2 to 3
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-13 05:49:59 +00:00
El RIDO
9e35a8f596
new release 1.6.0 2023-09-11 20:05:31 +02:00
El RIDO
a02bde8529
Merge pull request #168 from PrivateBin/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-06 07:14:09 +02:00
dependabot[bot]
b86422ee08
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 05:22:36 +00:00
El RIDO
a2e34e484c
Merge pull request #166 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.7.0
Bump zaproxy/action-full-scan from 0.6.0 to 0.7.0
2023-08-26 08:40:40 +02:00
dependabot[bot]
0b75c21acc
Bump zaproxy/action-full-scan from 0.6.0 to 0.7.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-25 05:33:54 +00:00
El RIDO
76f619dde5
Merge pull request #164 from PrivateBin/dependabot/docker/alpine-3.18.3
Bump alpine from 3.18.2 to 3.18.3
2023-08-08 20:03:46 +02:00
dependabot[bot]
8df467beea
Bump alpine from 3.18.2 to 3.18.3
Bumps alpine from 3.18.2 to 3.18.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 05:31:52 +00:00
El RIDO
e75e9dfa97
Merge pull request #162 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.6.0
Bump zaproxy/action-full-scan from 0.5.1 to 0.6.0
2023-08-04 06:22:11 +02:00
dependabot[bot]
d53e4c4c20
Bump zaproxy/action-full-scan from 0.5.1 to 0.6.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-03 05:17:28 +00:00
El RIDO
f093145c2b
Merge pull request #160 from PrivateBin/release-check
include release key, increasing robustness of image build process
2023-07-15 12:03:09 +02:00
El RIDO
79d858e5f3
include release key, increasing robustness of image build process 2023-07-15 09:53:14 +02:00
El RIDO
5cc7453743
Merge pull request #158 from fenak/more-aws-env-vars
Support more AWS related env vars
2023-07-10 12:44:23 +02:00
Felipe Nakandakari
16fb8caa2f
Add AWS_DEFAULT_REGION env var 2023-07-10 19:18:41 +10:00
Felipe Nakandakari
db69f83acc
Support more AWS related env vars 2023-07-10 19:08:14 +10:00
El RIDO
0d842b9019 new release 1.5.2 2023-07-09 10:51:25 +02:00
El RIDO
8172103259
Merge pull request #157 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.5.1
Bump zaproxy/action-full-scan from 0.5.0 to 0.5.1
2023-07-07 06:43:54 +02:00
dependabot[bot]
04ba547811
Bump zaproxy/action-full-scan from 0.5.0 to 0.5.1
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 05:35:47 +00:00
El RIDO
5abc9d5603
Merge pull request #156 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.5.0
Bump zaproxy/action-full-scan from 0.4.0 to 0.5.0
2023-07-01 08:01:31 +02:00
dependabot[bot]
ae587775e7
Bump zaproxy/action-full-scan from 0.4.0 to 0.5.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 05:15:44 +00:00
El RIDO
d136a66a3e
Merge pull request #153 from PrivateBin/dependabot/docker/alpine-3.18.2
Bump alpine from 3.18.0 to 3.18.2
2023-06-15 19:08:26 +02:00
dependabot[bot]
449e733615
Bump alpine from 3.18.0 to 3.18.2
Bumps alpine from 3.18.0 to 3.18.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 05:57:56 +00:00
El RIDO
6363ae3e58
Merge pull request #152 from PrivateBin/php82
upgrade to PHP 8.2
2023-05-22 12:31:33 +02:00
El RIDO
4e66fbe35e upgrade to PHP 8.2 2023-05-21 10:33:48 +02:00
El RIDO
3e380f2a41 php config stability, addresses #147 2023-05-21 10:15:29 +02:00
El RIDO
d7f8653f20
Merge pull request #149 from PrivateBin/dependabot/docker/alpine-3.18.0
Bump alpine from 3.17.3 to 3.18.0
2023-05-10 15:40:35 +02:00
dependabot[bot]
87f8d30569
Bump alpine from 3.17.3 to 3.18.0
Bumps alpine from 3.17.3 to 3.18.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-05-10 05:58:00 +00:00
El RIDO
9697dae1c1 bump version of base image for Trivy 2023-04-28 05:51:14 +02:00
El RIDO
76251acdcf
Merge pull request #145 from Nezteb/master
Add commented HSTS line to nginx site.conf
2023-04-01 08:47:00 +02:00
Noah Betzen
474bc19904
Add commented HSTS line to nginx site.conf 2023-03-30 17:04:11 -07:00
El RIDO
631dc15375
Merge pull request #143 from PrivateBin/dependabot/docker/alpine-3.17.3
Bump alpine from 3.17.2 to 3.17.3
2023-03-30 08:37:38 +02:00
dependabot[bot]
9a7fb9d24f
Bump alpine from 3.17.2 to 3.17.3
Bumps alpine from 3.17.2 to 3.17.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-30 05:58:25 +00:00
El RIDO
d3c42c14a0
Merge pull request #142 from PrivateBin/aws-env-vars
support AWS access tokens & some documentation
2023-03-01 06:22:56 +01:00
El RIDO
d29817213a support AWS access tokens & some documentation 2023-02-28 05:53:49 +01:00
El RIDO
68d583357c
Merge pull request #141 from PrivateBin/link-ghcr
document/link to the GitHub container registry
2023-02-28 05:38:17 +01:00
El RIDO
433ac78a29 mention the different prefixes per container registry 2023-02-26 16:49:15 +01:00
El RIDO
ee88c58dd0 document/link to the GitHub container registry 2023-02-26 08:48:04 +01:00
El RIDO
adc93d6675
Merge pull request #140 from Zoey2936/master
also push images to ghcr
2023-02-25 09:17:50 +01:00
Zoey
faf187d7d5
change username 2023-02-24 21:31:38 +01:00
Zoey
0657826ac5
Fix conditions 2023-02-23 23:24:54 +01:00
Zoey
4fcff77998
Update buildx.sh 2023-02-23 23:06:47 +01:00
Zoey
b75bc80c4b
Update build-images.yml 2023-02-23 23:00:28 +01:00
El RIDO
087acc8b56
Merge pull request #139 from PrivateBin/dependabot/docker/alpine-3.17.2
Bump alpine from 3.17.1 to 3.17.2
2023-02-13 08:27:20 +01:00
dependabot[bot]
b0bb905a6f
Bump alpine from 3.17.1 to 3.17.2
Bumps alpine from 3.17.1 to 3.17.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 06:02:03 +00:00
El RIDO
497843094e Merge branch 'master' of github.com:PrivateBin/docker-nginx-fpm-alpine 2023-01-21 19:44:49 +01:00
El RIDO
8597c753a5 disable provenance in manifest, addresses #137
workaround for https://github.com/docker/buildx/issues/1509
and https://github.com/moby/moby/issues/43126
2023-01-21 19:44:44 +01:00
El RIDO
7a8d0cdc04 do not purge php81-mbstring, if it is selected in the ALPINE_PACKAGES 2023-01-17 21:45:59 +01:00
El RIDO
ff87f9bba5
Merge pull request #135 from PrivateBin/s3-polyfill-errors
address S3 polyfill errors
2023-01-17 20:31:22 +01:00
El RIDO
81b9eb98bb add php81-mbstring to the s3 image and the lighter php81-iconv to the nginx-fpm-alpine one to satisfy mtdowling/jmespath.php's needs 2023-01-17 19:57:45 +01:00
El RIDO
6fa619e90a Revert "Fix polyfill errors when using S3"
This reverts commit 61ac4e1897.
2023-01-17 19:51:22 +01:00
sqlstatement
61ac4e1897
Fix polyfill errors when using S3 2023-01-16 19:28:44 +01:00
El RIDO
2d82d13a42
Merge pull request #133 from PrivateBin/dependabot/docker/alpine-3.17.1
Bump alpine from 3.17.0 to 3.17.1
2023-01-10 07:07:27 +01:00
dependabot[bot]
000cc464b5
Bump alpine from 3.17.0 to 3.17.1
Bumps alpine from 3.17.0 to 3.17.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 06:05:48 +00:00
El RIDO
ae131675ab
Merge pull request #132 from PrivateBin/aws-support
add simplexml & curl modules for images with AWS library
2023-01-10 07:04:53 +01:00
El RIDO
36318e1b6a for images with AWS library support add simplexml module and only for the S2 one also add the recommended curl one 2023-01-03 20:13:23 +01:00
El RIDO
658e52c2f0
Merge pull request #128 from PrivateBin/build-args-clarification
clear up the build arg & tag logic
2023-01-03 19:42:50 +01:00
El RIDO
601c16f334
Merge pull request #127 from PrivateBin/codeblock-readme
Fix syntax hiighlighting of code block
2022-12-31 08:18:12 +01:00
El RIDO
b5915a063a always write : explicitly, so it is more obvious what it is about - reverts earlier change 2022-12-31 08:10:50 +01:00
El RIDO
262d373a29 Merge branch 'master' into build-args-clarification 2022-12-31 08:00:10 +01:00
El RIDO
2cb8c1684d
Merge pull request #131 from PrivateBin/shellcheck
Add Shellcheck GitHub action
2022-12-31 07:57:08 +01:00
El RIDO
ecfc67a1f8
Update buildx.sh
Co-authored-by: rugk <rugk+git@posteo.de>
2022-12-31 07:56:25 +01:00
rugk
86cf8d7b15
Changed to console as highlight language and add $ prefix 2022-12-30 18:42:48 +01:00
rugk
3b95078242
Also run Shellcheck on PRs 2022-12-30 18:34:47 +01:00
rugk
2f74b91d21
Add Shellcheck GitHub action
Noticed as missing in https://github.com/PrivateBin/docker-nginx-fpm-alpine/pull/128 and thus added.
2022-12-30 18:32:52 +01:00
El RIDO
a54d5eaa93 same for push 2022-12-26 07:06:14 +01:00
El RIDO
6782c6bcca stick to one variable style 2022-12-26 07:00:15 +01:00
El RIDO
370a321bc1 avoid colon doubling 2022-12-26 06:55:38 +01:00
El RIDO
70983fda59 clear up the build arg & tag logic 2022-12-26 06:34:52 +01:00
El RIDO
ac3b128bf6 partial revert of 7ef0b6e63e
the final else branch is used used when the nightly scheduled build runs
2022-12-25 14:07:23 +01:00
rugk
2d530103dd
Fix syntax hiighlighting of code block 2022-12-25 10:53:18 +01:00
El RIDO
58f1132302
new release 1.5.1 2022-12-24 06:46:30 +01:00
El RIDO
ca5aa8f345
Merge pull request #124 from PrivateBin/php-cli
support running new administrative scripts
2022-12-24 06:41:49 +01:00
El RIDO
7ef0b6e63e
simplified build code, wording in doc 2022-12-24 04:56:36 +01:00
El RIDO
0ddd1dd1c8
Merge pull request #126 from Zoey2936/patch-1
Add stable tag on push
2022-12-22 17:53:57 +01:00
Zoey
8e6371ca37
Update README.md 2022-12-22 09:31:22 +01:00
Zoey
e2871fb800
Add stable tag on push 2022-12-21 20:51:30 +01:00
El RIDO
d55821fca0
clarification for migrations between different backend types 2022-12-20 19:27:06 +01:00
El RIDO
7f2e5cb8bb
moving administrative scripts out of web root, adding php CLI package and making them found in PATH plus documentation 2022-12-20 19:18:17 +01:00
El RIDO
8700dcd64e
new release 1.5.0 2022-12-11 06:38:22 +01:00
El RIDO
b05b987fa0
Merge pull request #113 from PrivateBin/s3-variant
WIP: add an S3 storage variant image
2022-12-11 06:32:54 +01:00
El RIDO
6c0ed051c0
Merge pull request #122 from PrivateBin/dependabot/docker/alpine-3.17.0
Bump alpine from 3.16.3 to 3.17.0
2022-11-24 21:02:05 +01:00
dependabot[bot]
63a77c19a2
Bump alpine from 3.16.3 to 3.17.0
Bumps alpine from 3.16.3 to 3.17.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-23 05:03:49 +00:00
El RIDO
bed25c4787
Merge pull request #121 from PrivateBin/dependabot/docker/alpine-3.16.3
Bump alpine from 3.16.2 to 3.16.3
2022-11-14 19:15:03 +01:00
dependabot[bot]
5b5d06813a
Bump alpine from 3.16.2 to 3.16.3
Bumps alpine from 3.16.2 to 3.16.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 05:05:36 +00:00
El RIDO
87503ba97e
Merge branch 'master' into s3-variant 2022-11-12 07:58:20 +01:00
El RIDO
329ec245a5
Merge pull request #120 from PrivateBin/php81
upgrade to PHP 8.1
2022-11-10 07:44:11 +01:00
El RIDO
4b66d33626
Update README.md
Co-authored-by: rugk <rugk+git@posteo.de>
2022-11-10 06:47:00 +01:00
El RIDO
e96787428d
upgrade to PHP 8.1 2022-11-05 08:09:58 +01:00
El RIDO
498bc936f8
and enable it in the workflow 2022-10-22 18:18:38 +02:00
El RIDO
ce58ceb146
add an S3 storage variant image 2022-10-22 18:13:11 +02:00
El RIDO
2fa45c2159
Merge pull request #112 from PrivateBin/readme-db
reword misleading section on databases
2022-10-17 18:23:16 +02:00
El RIDO
993b854a58
reword misleading section on databases
SQLite hasn't been supported since at least dba458cad9
and with 1.4 the database storage stores all of the persistance data, too.
2022-10-12 06:35:32 +02:00
El RIDO
a206cc9a22
Merge pull request #110 from PrivateBin/dependabot/docker/alpine-3.16.2
Bump alpine from 3.16.1 to 3.16.2
2022-08-11 05:15:09 +02:00
dependabot[bot]
eb7c02fb4e
Bump alpine from 3.16.1 to 3.16.2
Bumps alpine from 3.16.1 to 3.16.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-10 05:15:52 +00:00
El RIDO
ba942807f0
Merge pull request #108 from PrivateBin/self-link-header-fix
disable header preventing opening links to self
2022-08-02 20:02:01 +02:00
El RIDO
8796735e80
issue got moved
Co-authored-by: rugk <rugk+git@posteo.de>
2022-07-31 18:15:36 +02:00
El RIDO
d6cead99eb
disable header preventing opening links to self, fixes #959 2022-07-31 08:49:36 +02:00
El RIDO
1d74c1ae56
Merge pull request #107 from PrivateBin/dependabot/docker/alpine-3.16.1
Bump alpine from 3.16.0 to 3.16.1
2022-07-21 19:18:54 +02:00
El RIDO
5fddce82fe
Merge pull request #106 from PrivateBin/cohort
remove Permission-Policy header
2022-07-21 19:17:32 +02:00
dependabot[bot]
f9add6c10a
Bump alpine from 3.16.0 to 3.16.1
Bumps alpine from 3.16.0 to 3.16.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-19 05:18:59 +00:00
El RIDO
90e746b111
remove duplicate Permission-Policy header, now set on the application level
6f3bb25b09
2022-07-18 18:11:45 +02:00
El RIDO
17eaeeb67d
Merge pull request #100 from PrivateBin/dependabot/docker/alpine-3.16.0
Bump alpine from 3.15.4 to 3.16.0
2022-05-24 19:04:24 +02:00
dependabot[bot]
46d8bf048d
Merge pull request #101 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.4.0 2022-05-24 17:04:04 +00:00
dependabot[bot]
cb4cab5429
Bump alpine from 3.15.4 to 3.16.0
Bumps alpine from 3.15.4 to 3.16.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-24 05:37:35 +00:00
dependabot[bot]
22f9dcf620
Bump zaproxy/action-full-scan from 0.3.0 to 0.4.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-24 05:37:35 +00:00
dependabot[bot]
8487fba4d3
Merge pull request #98 from PrivateBin/dependabot/github_actions/docker/setup-qemu-action-2 2022-05-09 17:20:13 +00:00
El RIDO
859472f10b
Merge pull request #99 from PrivateBin/dependabot/github_actions/docker/setup-buildx-action-2
Bump docker/setup-buildx-action from 1 to 2
2022-05-09 19:19:31 +02:00
dependabot[bot]
dba31fd76c
Bump docker/setup-buildx-action from 1 to 2
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 05:14:21 +00:00
dependabot[bot]
b87c75fc99
Bump docker/setup-qemu-action from 1 to 2
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 05:14:18 +00:00
El RIDO
4ae270e02a
Merge pull request #96 from PrivateBin/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-04-26 19:07:30 +02:00
dependabot[bot]
56113d3577
Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [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/v1...v2)

---
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>
2022-04-26 05:27:08 +00:00
El RIDO
8480aea07f
new release 1.4.0 2022-04-09 15:21:14 +02:00
dependabot[bot]
41266c51dc
Merge pull request #95 from PrivateBin/dependabot/docker/alpine-3.15.4 2022-04-05 18:16:51 +00:00
dependabot[bot]
7a9fde45e6
Bump alpine from 3.15.3 to 3.15.4
Bumps alpine from 3.15.3 to 3.15.4.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 05:14:54 +00:00
dependabot[bot]
45d81c4df4
Merge pull request #93 from PrivateBin/dependabot/docker/alpine-3.15.3 2022-03-30 03:01:32 +00:00
dependabot[bot]
1d1891bcda
Bump alpine from 3.15.2 to 3.15.3
Bumps alpine from 3.15.2 to 3.15.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 05:19:54 +00:00
El RIDO
cc06d4440b
Merge pull request #92 from PrivateBin/dependabot/docker/alpine-3.15.2
Bump alpine from 3.15.1 to 3.15.2
2022-03-24 19:13:00 +01:00
dependabot[bot]
e7c1a07547
Bump alpine from 3.15.1 to 3.15.2
Bumps alpine from 3.15.1 to 3.15.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 05:19:27 +00:00
El RIDO
8e608a7e84
Merge pull request #90 from PrivateBin/alpine-3.15.1
bump the alpine base image, ensures openssl 1.1.1n is installed
2022-03-18 05:39:30 +01:00
El RIDO
74c7642c5f
bump alpine base image, ensures we got the openssl upgrade installed 2022-03-17 18:00:08 +01:00
El RIDO
17672a8557
Merge pull request #89 from PrivateBin/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-04 17:54:26 +01:00
dependabot[bot]
8f220e1574
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 05:22:45 +00:00
El RIDO
b9f5f0c6cb
Merge pull request #88 from PrivateBin/zap-rework-rules
Remove now fixed excluded ZAP rules
2022-03-01 06:47:31 +01:00
rugk
aee7ca9368
Remove now fixed exclusions
According to the upstream issues these both should be fixed and can thus be removed.
2022-02-28 22:46:34 +01:00
El RIDO
35c74f66bc
Merge pull request #87 from PrivateBin/cleanup
Cleanup edge build / improve smoke test
2022-02-15 18:55:03 +01:00
El RIDO
4eb4fc201e
make smoke test more robust
php-fpm logs ERROR in uppercase, which wasn't detected by the previous grep
2022-02-13 09:53:46 +01:00
El RIDO
6e7cf3c019
Revert "ssl_client will become obsolete when busybox gets migrated to openssl 3, for now we need to still add it explicitly for current alpine edge, while this is being worked on"
This has since occurred and we no longer need this workaround for alpine edge.

This reverts commit 85a24618b0.
2022-02-13 09:51:26 +01:00
El RIDO
f459d85349
Merge pull request #83 from PrivateBin/dependabot/docker/alpine-3.15.0
Bump alpine from 3.14 to 3.15.0
2021-11-25 06:58:38 +01:00
dependabot[bot]
d045e0da99
Bump alpine from 3.14 to 3.15.0
Bumps alpine from 3.14 to 3.15.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-25 05:18:41 +00:00
El RIDO
5eb40fe550
Merge pull request #82 from PrivateBin/fsgroup-init
replace init container with fsGroup in example k8s deployment
2021-11-20 09:24:35 +01:00
El RIDO
bd0b6ae841
replace init container with fsGroup security context in example k8s deployment 2021-11-10 07:14:26 +01:00
El RIDO
e046f8d45b
Merge pull request #81 from PrivateBin/smoketest
add a smoketest of the amd64 image, before pushing all archs
2021-10-22 10:21:29 +02:00
El RIDO
32821af5c4
Merge pull request #80 from PrivateBin/js-headers
move Cache-Control header to server block, remove js location block
2021-10-22 10:18:42 +02:00
El RIDO
541efff0cf
still doesn't use the local image 2021-10-14 21:32:23 +02:00
El RIDO
a9c18233c8
still doesn't use the local image 2021-10-14 21:30:50 +02:00
El RIDO
eaa44f6aee
still doesn't use the local image 2021-10-14 21:26:14 +02:00
El RIDO
d9772d452c
still doesn't use the local image 2021-10-14 21:15:56 +02:00
El RIDO
64d5ae244b
still doesn't use the local image 2021-10-14 21:13:41 +02:00
El RIDO
561165c055
buildx build doesn't store image in local docker image cache, so we need to build it traditionally for the smoketest 2021-10-14 21:05:30 +02:00
El RIDO
10af547866
need these arguments to get split 2021-10-14 20:57:05 +02:00
El RIDO
0fa6605d91
add a smoketest of the amd64 image, before pushing all archs 2021-10-14 20:44:53 +02:00
El RIDO
4afa86cb3e
move headers to static location block, makes fastcgi_hide_header unnecessary 2021-10-14 19:27:04 +02:00
El RIDO
25abb55cd0
move Cache-Control header to server block, making js location unnecessary 2021-10-13 19:55:02 +02:00
El RIDO
f15474e7c8
Merge pull request #77 from PrivateBin/nginxfix
Fix syntax error in nginx config
2021-10-10 19:55:18 +02:00
rugk
df4436b798
Fix syntax error in nginx config
This prevented the startup of the nginx server and thus the container.

Fixes https://github.com/PrivateBin/docker-nginx-fpm-alpine/issues/75
2021-10-09 17:24:10 +02:00
El RIDO
90d1fc1ba6
Merge pull request #74 from sylr/no-transform
Add Cache-Control header with no-transform directive
2021-10-08 19:14:28 +02:00
Sylvain Rabot
90b0271bf2
Add Cache-Control header with no-transform directive
This should avoid that proxies like Cloudflare and others break SRI.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-10-08 13:39:34 +02:00
El RIDO
607c4248b9
Merge pull request #72 from PrivateBin/move-edge-build
run all image builds in parallel, letting all builds conclude
2021-10-02 19:50:17 +02:00
El RIDO
93fe705e7d invert edge logic, for consistency 2021-09-30 05:11:53 +02:00
El RIDO
c841e76c7e fully unwind & parallelize loop 2021-09-29 20:03:42 +02:00
El RIDO
76234b4a1e split stable & edge builds, for parallelization & avoiding failures in one to prevent the other images to build 2021-09-29 19:41:07 +02:00
El RIDO
bcedf56664 Merge branch 'master' into move-edge-build 2021-09-29 19:10:40 +02:00
El RIDO
ea2e42977c
Merge pull request #71 from PrivateBin/gpg-agent-fix
ensure gpg-agent is dead, before deleting the $GNUPGHOME
2021-09-29 19:09:00 +02:00
El RIDO
0309527d88 run the edge builds in a separate loop 2021-09-29 06:02:14 +02:00
El RIDO
58ece9ae1a ensure gpg-agent is dead, before deleting the $GNUPGHOME 2021-09-29 05:43:58 +02:00
El RIDO
20b7e06207
Merge pull request #70 from PrivateBin/edge-ssl-fix
edge build: deal with ssl_client while busybox gets migrated to openssl 3
2021-09-28 06:11:41 +02:00
El RIDO
85a24618b0 ssl_client will become obsolete when busybox gets migrated to openssl 3, for now we need to still add it explicitly for current alpine edge, while this is being worked on 2021-09-26 10:28:06 +02:00
El RIDO
3a19506ba2
Merge pull request #67 from PrivateBin/dependabot/github_actions/zaproxy/action-full-scan-0.3.0
Bump zaproxy/action-full-scan from 0.2.0 to 0.3.0
2021-09-18 09:17:10 +02:00
El RIDO
09be552192
Merge pull request #68 from PrivateBin/rm-cornercase
handle corner case deleting temporary files
2021-09-18 09:16:54 +02:00
El RIDO
b737f81c4f
work around corner case with deletion of temporary files using busybox rm 2021-09-15 19:18:20 +02:00
dependabot[bot]
6ea584c391
Bump zaproxy/action-full-scan from 0.2.0 to 0.3.0
Bumps [zaproxy/action-full-scan](https://github.com/zaproxy/action-full-scan) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/zaproxy/action-full-scan/releases)
- [Changelog](https://github.com/zaproxy/action-full-scan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zaproxy/action-full-scan/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: zaproxy/action-full-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-15 05:15:31 +00:00
El RIDO
fa2d71bd8a
Merge pull request #65 from PrivateBin/s6-simplify
simplify s6 service handling
2021-09-07 21:20:57 +02:00
El RIDO
1f998aab8a
remove s6-linux-init & s6-rc from stack 2021-09-07 07:27:02 +02:00
El RIDO
ae23677ae2
Merge pull request #64 from PrivateBin/dependabot
Enable Dependabot for Docker and GitHub Actions
2021-09-01 20:26:50 +02:00
rugk
c851b02083
Enable Dependabot for Docker and GitHub Actions
AFAIK (and this was new to me) Dependabot is not active by default.

This enables it for all dependencies here (Github Actions and Docker), so it scans and suggests updates.
2021-09-01 01:25:09 +02:00
El RIDO
f052464b6e
Merge pull request #63 from PrivateBin/trivyname
Let's properly name things…
2021-08-26 14:43:44 +02:00
rugk
390d7cb50f
Let's properly name things…
Of course this is less of a build and more of a build for analysis with Trivy…
2021-08-25 23:10:39 +02:00
El RIDO
fcfa332495
preserve environment for PHP, adresses regression reported in #62 2021-08-19 10:15:52 +02:00
El RIDO
9e7cc388b7
remove obsolete note reg. port 80 2021-08-14 10:42:42 +02:00
El RIDO
48ef77a7aa
fix s6-rc database permissions, required for running with read-write root fs, fixes #59 2021-08-11 20:26:32 +02:00
El RIDO
7bc25d916b
Merge branch 's6-rc' 2021-08-09 21:37:58 +02:00
El RIDO
861a91f0b6
switch from s6-overlay to s6-rc, fixes #57 2021-08-09 21:12:16 +02:00
El RIDO
7a10c423f3
Merge pull request #56 from gabops/master
Fix reference to port on liveness and readiness probes in README.md
2021-08-05 20:03:03 +02:00
Gabriel Suarez
0591d10e16 Fix reference to port on liveness and readiness probes 2021-08-04 17:37:26 +01:00
El RIDO
27f415d3d5
Merge pull request #52 from binxio/issue-51
build nightly from the scheduled branch
2021-07-18 16:01:36 +02:00
Mark van Holsteijn
2a42122e6e alternatively build from git repository branch
- by default, the dockerfile builds a released version of privatebin indicated by RELEASE
- if RELEASE is not a semantic version, it is assumed to be a branch name and privatebin will be build from head.
2021-07-17 20:57:55 +02:00
Mark van Holsteijn
92b1e57289 Merge branch 'source' into issue-51 2021-07-17 20:06:08 +02:00
El RIDO
f9ccd67ff6
readd short-tag 2021-07-14 21:50:09 +02:00
El RIDO
1a7ee4ca31
stick to one convention 2021-07-14 21:32:17 +02:00
El RIDO
75c1fc3603
prevent premature argument expansion 2021-07-14 21:29:37 +02:00
El RIDO
d372a1792f
fix build arguments 2021-07-14 21:21:12 +02:00
El RIDO
ade60b7e1c
fix non-composer build 2021-07-14 21:12:09 +02:00
El RIDO
2dffa86d62
Merge branch 'binxio-issue-41' 2021-07-14 21:08:18 +02:00
El RIDO
11917f03b7
document image variants and tags, fixes #40 2021-07-14 21:04:27 +02:00
El RIDO
c2ff69021d
take shellcheck to town 2021-07-14 20:24:07 +02:00
El RIDO
09912939fe
be more OCI compliant, avoid unnecessary work 2021-07-13 21:05:43 +02:00
Mark van Holsteijn
0a39c4075b create separate images for fs, pdo and gcs
- modified buildx.sh to build privatebin/fs, privatebin/pdo, privatebin/gcs and privatebin/nginx-fpm-alpine
- default build of privatebin/nginx-fpm-alpine contains everything
2021-07-11 19:40:47 +02:00
Mark van Holsteijn
28a2d30e9b revert buildx.sh to keep nightly and edge build on signed releases 2021-07-07 09:11:26 +02:00
El RIDO
9568519e50
Merge branch 'no-sync-on-prs' 2021-07-07 08:25:36 +02:00
El RIDO
5734338459
remove section completly instead of just commenting part of it - git history will preserve it all if we want to go back #53 2021-07-07 08:24:29 +02:00
rugk
725a000629
Disable Sync for PRs 2021-07-06 22:25:25 +02:00
Mark van Holsteijn
acbd5d0160 set the RELEASE to the git ref first, before naming the tag 2021-07-06 21:21:19 +02:00
Mark van Holsteijn
d51ef912a8 use git archive instead of curl to get the tarball 2021-07-06 21:17:55 +02:00
Mark van Holsteijn
e99aff1907 build nightly from the scheduled branch 2021-07-06 19:11:10 +02:00
El RIDO
8fe3ab9ce7
Merge branch 'master' of github.com:PrivateBin/docker-nginx-fpm-alpine 2021-07-06 06:26:49 +02:00
El RIDO
827f2c3ef6
set default CONFIG_PATH, fixes #50 2021-07-06 06:26:18 +02:00
El RIDO
7e1fc11be3
Merge pull request #38 from binxio/add-gcs-support
pass in GoogleCloudStorage required environment variable
2021-07-03 08:46:24 +02:00
El RIDO
7d3ae98198
Revert temporarily removed ppc64le build, fixes #48"
This reverts commit 1ae3716721.
2021-06-26 06:49:45 +02:00
El RIDO
edc857a9f3
ignore false positive in ZAP report #29 2021-06-26 06:46:17 +02:00
El RIDO
1ae3716721
remove (temporarily) ppc64le build to allow the other architecture's images to be produced #48 2021-06-19 06:18:55 +02:00
El RIDO
2a7793e43d
upgrade to alpine 3.14 2021-06-19 05:59:14 +02:00
El RIDO
b3d8f7a47d
Merge pull request #46 from PrivateBin/trivy
Add Trivy analysis
2021-06-06 17:53:33 +02:00
rugk
41f31bb6e7
Rename trivy-analysis.yml to .github/workflows/trivy-analysis.yml 2021-06-06 17:27:33 +02:00
El RIDO
5742021b20
correct spacing of conditional 2021-06-06 11:31:26 +02:00
El RIDO
de2c135fef
proper quoting 2021-06-06 11:27:16 +02:00
El RIDO
9b0301e2ee
Revert "trying to workaround github action redaction mechanism"
This reverts commit 2cc183223e.
2021-06-06 11:22:44 +02:00
El RIDO
2cc183223e
trying to workaround github action redaction mechanism 2021-06-06 11:21:14 +02:00
El RIDO
a662fb5d02
Merge branch 'master' of github.com:PrivateBin/docker-nginx-fpm-alpine 2021-06-06 11:15:43 +02:00
El RIDO
63ad058a51
move github build into script for easier maintenance 2021-06-06 11:14:30 +02:00
El RIDO
ff4b815893
install google/cloud-storage library and dependencies #41 2021-06-06 10:41:52 +02:00
El RIDO
742b03ba2f
update reference to php8 2021-06-06 09:31:07 +02:00
El RIDO
253bab9ec2
Merge pull request #44 from PrivateBin/snyk
Add snyk container scanning CI
2021-06-05 07:59:12 +02:00
El RIDO
2e790e70d0
Merge branch 'binxio-issue-42' 2021-06-05 07:52:36 +02:00
El RIDO
8539ee0e6e
wait for up to 10 seconds on the php-fpm socket to come up, before starting nginx 2021-06-05 07:49:07 +02:00
rugk
379c73aef9
better naming 2021-06-05 00:50:05 +02:00
rugk
136f2ce32e
Add Trivy analysis
Oh I'm sorry, but here is another analysis tool 😅 

The cool thing here it says it only needs 10s at most. So let's test that for real…

https://github.com/aquasecurity/trivy#features
2021-06-05 00:44:39 +02:00
rugk
aab06e6a36
Add snyk container scanning CI
Another GitHub action that looked useful.

I've had to login with my GitHub account at https://app.snyk.io to get a free API token (saved as a secret in this repo) though.
2021-06-04 23:36:36 +02:00
Mark van Holsteijn
bcb52002aa do not start nginx until /var/run/php-fpm.sock is available 2021-06-04 22:12:52 +02:00
Mark van Holsteijn
be11f9b1b2 pass in GoogleCloudStorage required environment variables 2021-05-24 15:05:05 +02:00
El RIDO
081580da91
build context != Dockerfile 2021-05-06 20:31:41 +02:00
El RIDO
f43c4f64a9
adding an Alpine edge build, as per discussion in #36 2021-05-06 20:26:18 +02:00
El RIDO
0928070a04
allow image to run as any non-root user/group, fixes #10 2021-04-28 18:29:58 +02:00
El RIDO
7326e27e8c
increment version 2021-04-28 18:28:49 +02:00
El RIDO
ada7a40cbf
disable further false positives 2021-04-22 19:14:07 +02:00
El RIDO
453cff7c01
working on improving #29 2021-04-16 19:13:00 +02:00
El RIDO
bd1a39f520
Merge pull request #32 from PrivateBin/security-headers
new security headers, recommended by ZAP scan #29
2021-04-06 05:49:14 +02:00
El RIDO
7b367cad23
new security headers, recommended by ZAP scan #29 2021-04-05 18:21:55 +02:00
El RIDO
a86fc49145
new release 1.3.5 2021-04-05 17:55:51 +02:00
El RIDO
52cbe547da
Merge pull request #30 from PrivateBin/owasp-rules-fine
Ignore some OWASP rules etc
2021-04-05 17:48:25 +02:00
rugk
781eca69b7
Use ignore rules files in workflow 2021-04-05 14:44:11 +02:00
rugk
3373723d60
Add ignore rules files 2021-04-05 14:43:54 +02:00
rugk
2fb3087192
Checkout repository 2021-04-05 14:00:04 +02:00
El RIDO
ec07a9ff88
Merge pull request #28 from PrivateBin/owasp-scan
Create OWASP GitHub Action
2021-04-05 12:23:48 +02:00
rugk
567bf3332a
Fix URL 2021-04-04 13:26:06 +02:00
rugk
27922a0fb0
Create OWASP GItHub Action 2021-04-04 13:24:13 +02:00
El RIDO
7e968c9b82
move snyk over to Helm chart, it doesn't support raw dockerfiles 2021-02-05 05:04:55 +01:00
El RIDO
0ca9b77288
provide snyk a target 2021-02-05 05:01:20 +01:00
El RIDO
1e22cfd764
Merge branch 'master' of github.com:PrivateBin/docker-nginx-fpm-alpine 2021-02-05 04:56:22 +01:00
El RIDO
2afdf0194d
correct k8s example, kudos @Feliksas 2021-02-05 04:55:46 +01:00
El RIDO
a8e1b01dd7
Create snyk_infrastructure-analysis.yml 2021-01-26 19:05:41 +01:00
El RIDO
25104d083f
adapt to new nginx 1.18 folder structure 2021-01-17 09:13:47 +01:00
El RIDO
b5c2b4d1fe
switch to packaged s6-overlay, shaving off one MiB from the image 2021-01-17 08:54:28 +01:00
El RIDO
8a8160e1d5
upgrade chown image to busybox 1.33.0 / musl 1.2.2 2021-01-16 07:34:17 +01:00
El RIDO
798992cb0e
upgrade to PHP 8 2021-01-16 06:23:37 +01:00
El RIDO
3892bc3573
upgrade to alpine 3.13 2021-01-16 05:57:39 +01:00
El RIDO
cf84eb76ba
upgrade s6-overlay 2021-01-16 05:54:30 +01:00
El RIDO
7dfe1b2bb4
trigger a rebuild of the 1.3.4 image to include security updates, fixes #25 2020-10-24 07:06:55 +02:00
El RIDO
2e25086fb1
only add qemu platforms needed 2020-10-03 11:05:45 +02:00
El RIDO
38eca302d5
explore the switch to new buildx action by docker 2020-10-03 11:00:54 +02:00
El RIDO
b84118dd88
make security policy explicit in the k8s example as per helm chart 2020-10-03 10:35:05 +02:00
El RIDO
6ab53b4699
document probes for k8s 2020-10-03 10:32:20 +02:00
El RIDO
7994a768ad
using numeric IDs allows the image to run on kubernetes with the runAsNonRoot security context 2020-10-01 19:18:14 +02:00
El RIDO
4b98c98f49
addressing concerns over busybox usage, by switching to minimal chown binary, closes #13 2020-08-30 12:22:01 +02:00
El RIDO
372ed866ac
avoid relative path in docker command examples, closes #20 2020-08-30 08:21:27 +02:00
El RIDO
246d479c05
build and push tags as well 2020-08-16 15:48:29 +02:00
El RIDO
a5904883ef
upgrade s6 2020-08-16 14:45:03 +02:00
El RIDO
920ec587e7
syntax 2020-07-06 20:11:33 +02:00
El RIDO
de03d8f328
Merge branch 'zuh0-nightly-builds' 2020-07-06 20:04:54 +02:00
El RIDO
e470ccbfac
simplify actions, adjust image, only build tags or on schedule 2020-07-06 20:04:26 +02:00
Gabriel Duque
1bc818024b
ci: deploy nightly built multi-architecture images
Signed-off-by: Gabriel Duque <gabriel@zuh0.com>
2020-07-06 10:27:30 +02:00
El RIDO
56434e8b9e
upgrade alpine base image (same exact php version) 2020-06-01 08:18:01 +02:00
El RIDO
885c692c07
correct the k8s example 2020-05-25 19:39:42 +02:00
El RIDO
9582113c42
enable ipv6 listening 2020-04-28 07:13:40 +02:00
El RIDO
d83d136f45
remove backwards compatibility with port 80 to drop setcap use, closes #15 2020-04-28 07:10:27 +02:00
El RIDO
c11b91da26
update to openssl 1.1.1g 2020-04-22 20:01:16 +02:00
El RIDO
770958fc7c
new release 1.3.4 2020-03-22 07:21:58 +01:00
El RIDO
f8edfbd009
new release 1.3.3 2020-02-16 11:54:05 +01:00
El RIDO
36fc8ff134
provide a working example of a k8s deployment, fixes #8 2020-01-18 06:40:18 +01:00
El RIDO
e1df8e99a4
Merge branch 'mattclegg-1578563055' 2020-01-16 05:37:09 +01:00
mattclegg
f0aa6e51d4
[BUGFIX] add nobody to www-data group to allow correct ownerships 2020-01-13 14:04:59 +01:00
El RIDO
c0e969be7d
new release 1.3.2 2020-01-11 12:07:47 +01:00
32 changed files with 787 additions and 118 deletions

View file

@ -1,8 +1,10 @@
# Docs
README.md
README*.md
# Git
.git/
.github/
buildx.sh
# OSX
.DS_Store

12
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
# src: https://github.com/marketplace/actions/build-and-push-docker-images#keep-up-to-date-with-github-dependabot
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

23
.github/rules.tsv vendored Normal file
View file

@ -0,0 +1,23 @@
# connect-src wildcard is required for the API to work when called from external instances
10055 IGNORE (CSP: Wildcard Directive)
# the image is intended for being used behind a reverse-proxy, so TLS termination is already done
10106 IGNORE (HTTP Only Site)
# the code is open-source, no special information here
10027 IGNORE (Information Disclosure - Suspicious Comments)
40034 IGNORE (.env Information Leak)
# it doesn't seem to like that we configured our nginx to not respond to directory paths
10104 IGNORE (User Agent Fuzzer)
# the supposed timestamps are actually rgba values in hex notation or the fractional part of percentages in CSS files
10096 IGNORE (Timestamp Disclosure - Unix)
# we have no authentication so CSRF is not possible, the detected password form is only used interactively
10202 IGNORE (Absence of Anti-CSRF Tokens)
20012 IGNORE (Anti-CSRF Tokens Check)
# glad we are considered modern
10109 IGNORE (Modern Web Application)
#
#
# false-positives
#
# again we return 200 to some strange URL
90034 IGNORE (Cloud Metadata Potentially Exposed)
40035 IGNORE (Hidden File Found)
Can't render this file because it has a wrong number of fields in line 2.

46
.github/workflows/build-images.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Build & Deploy container image
on:
schedule:
- cron: '0 0 * * *' # everyday at midnight UTC
pull_request:
branches: master
push:
branches: master
tags: '*'
jobs:
buildx:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
base-image: [stable, edge]
destination-image: [nginx-fpm-alpine, fs, gcs, pdo, s3]
name: ${{ matrix.destination-image }} image / ${{ matrix.base-image }} release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
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:
install: true
- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')) }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')) }}
with:
registry: ghcr.io
username: privatebin
password: ${{ github.token }}
- name: Docker Build
run: ./buildx.sh ${{ github.event_name }} ${{ matrix.destination-image }} ${{ matrix.base-image }}

53
.github/workflows/owasp.yml vendored Normal file
View file

@ -0,0 +1,53 @@
# This is a basic workflow to help you get started with Actions
name: Security-scan
# Controls when the action will run.
on:
schedule:
- cron: '0 3 * * *' # everyday at 03:00 UTC
pull_request:
branches: master
push:
branches: master
tags: '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
# Runs a single command using the runners shell
- name: Pull and start docker
run: docker run -d --read-only -p 8080:8080 privatebin/nginx-fpm-alpine
# Run OWASP scan
- name: OWASP ZAP Full Scan
uses: zaproxy/action-full-scan@v0.12.0
with:
# GitHub Token to create issues in the repository
#token: # optional, default is ${{ github.token }}
# Target URL
target: http://localhost:8080
# Relative path of the ZAP configuration file
rules_file_name: ".github/rules.tsv" # optional
# The Docker file to be executed
#docker_name: # default is owasp/zap2docker-stable
# Additional command line options
#cmd_options: # optional
# The title for the GitHub issue to be created
#issue_title: # optional, default is ZAP Full Scan Report
# The action status will be set to fail if ZAP identifies any alerts during the full scan
#fail_action: # optional

20
.github/workflows/shellcheck.yml vendored Normal file
View file

@ -0,0 +1,20 @@
on:
push:
branches:
- master
pull_request:
branches: master
name: "Shellcheck"
permissions: {}
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

View file

@ -0,0 +1,40 @@
# A sample workflow which checks out the code, builds a container
# image using Docker and scans that image for vulnerabilities using
# Snyk. The results are then uploaded to GitHub Security Code Scanning
#
# For more examples, including how to limit scans to only high-severity
# issues, monitor images for newly disclosed vulnerabilities in Snyk and
# fail PR checks for new vulnerabilities, see https://github.com/snyk/actions/
name: Snyk Container
on:
push:
branches: [ master ]
schedule:
- cron: '23 7 * * 5'
jobs:
snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build a Docker image
run: docker build -t privatebin/nginx-fpm-alpine .
- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
continue-on-error: true
uses: snyk/actions/docker@master
env:
# In order to use the Snyk Action you will need to have a Snyk API token.
# More details in https://github.com/snyk/actions#getting-your-snyk-token
# or you can signup for free at https://snyk.io/login
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: privatebin/nginx-fpm-alpine
args: --file=Dockerfile
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif

35
.github/workflows/trivy-analysis.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: trivy-analysis
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '20 13 * * 3'
jobs:
build:
name: Trivy analysis
runs-on: "ubuntu-20.04"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build an image from Dockerfile
run: |
docker build -t privatebin/nginx-fpm-alpine:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'privatebin/nginx-fpm-alpine:${{ github.sha }}'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
Dockerfile.edge

View file

@ -1,69 +1,104 @@
FROM alpine:3.11
FROM alpine:3.21
MAINTAINER PrivateBin <support@privatebin.org>
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.6
ARG UID=65534
ARG GID=82
ENV RELEASE 1.3.1
ENV PBURL https://github.com/PrivateBin/PrivateBin/
ENV S6RELEASE v1.22.1.0
ENV S6URL https://github.com/just-containers/s6-overlay/releases/download/
ENV S6_READ_ONLY_ROOT 1
ENV CONFIG_PATH=/srv/cfg
ENV PATH=$PATH:/srv/bin
LABEL org.opencontainers.image.authors=support@privatebin.org \
org.opencontainers.image.vendor=PrivateBin \
org.opencontainers.image.documentation=https://github.com/PrivateBin/docker-nginx-fpm-alpine/blob/master/README.md \
org.opencontainers.image.source=https://github.com/PrivateBin/docker-nginx-fpm-alpine \
org.opencontainers.image.licenses=zlib-acknowledgement \
org.opencontainers.image.version=${RELEASE}
COPY release.asc /tmp/
RUN \
# Prepare composer dependencies
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}" ;\
fi ;\
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 add --no-cache gnupg libcap nginx php7-fpm php7-json php7-gd \
php7-opcache php7-pdo_mysql php7-pdo_pgsql tzdata \
# Remove (some of the) default nginx config
&& rm -f /etc/nginx.conf /etc/nginx/conf.d/default.conf /etc/php7/php-fpm.d/www.conf \
&& apk upgrade --no-cache \
&& 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/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-* \
# Ensure nginx logs, even if the config has errors, are written to stderr
&& ln -s /dev/stderr /var/log/nginx/error.log \
# Install PrivateBin
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg2 --list-public-keys || /bin/true \
&& wget -qO - https://privatebin.info/key/release.asc | gpg2 --import - \
&& rm -rf /var/www/* \
&& cd /tmp \
&& wget -qO ${RELEASE}.tar.gz.asc ${PBURL}releases/download/${RELEASE}/PrivateBin-${RELEASE}.tar.gz.asc \
&& wget -q ${PBURL}archive/${RELEASE}.tar.gz \
&& gpg2 --verify ${RELEASE}.tar.gz.asc \
&& export GNUPGHOME="$(mktemp -d -p /tmp)" \
&& gpg2 --list-public-keys || /bin/true \
&& gpg2 --import /tmp/release.asc \
&& rm -rf /var/www/* \
&& if expr "${RELEASE}" : '[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}$' >/dev/null ; then \
echo "getting release ${RELEASE}"; \
wget -qO ${RELEASE}.tar.gz.asc ${PBURL}releases/download/${RELEASE}/PrivateBin-${RELEASE}.tar.gz.asc \
&& wget -q ${PBURL}archive/${RELEASE}.tar.gz \
&& gpg2 --verify ${RELEASE}.tar.gz.asc ; \
else \
echo "getting tarball for ${RELEASE}"; \
git clone ${PBURL%%/}.git -b ${RELEASE}; \
(cd $(basename ${PBURL}) && git archive --prefix ${RELEASE}/ --format tgz ${RELEASE} > /tmp/${RELEASE}.tar.gz); \
fi \
&& cd /var/www \
&& tar -xzf /tmp/${RELEASE}.tar.gz --strip 1 \
&& if [ -n "${COMPOSER_PACKAGES}" ] ; then \
composer remove --dev --no-update phpunit/phpunit \
&& composer config --unset platform \
&& composer require --no-update ${COMPOSER_PACKAGES} \
&& composer update --no-dev --optimize-autoloader \
rm /usr/local/bin/* ;\
fi \
&& rm *.md cfg/conf.sample.php \
&& mv cfg lib tpl vendor /srv \
&& mv bin cfg lib tpl vendor /srv \
&& mkdir -p /srv/data \
&& sed -i "s#define('PATH', '');#define('PATH', '/srv/');#" index.php \
# Install s6 overlay for service management
&& wget -qO - https://keybase.io/justcontainers/key.asc | gpg2 --import - \
&& cd /tmp \
&& S6ARCH=$(uname -m) \
&& case ${S6ARCH} in \
x86_64) S6ARCH=amd64;; \
armv7l) S6ARCH=armhf;; \
esac \
&& wget -q ${S6URL}${S6RELEASE}/s6-overlay-${S6ARCH}.tar.gz.sig \
&& wget -q ${S6URL}${S6RELEASE}/s6-overlay-${S6ARCH}.tar.gz \
&& gpg2 --verify s6-overlay-${S6ARCH}.tar.gz.sig \
&& tar -xzf s6-overlay-${S6ARCH}.tar.gz -C / \
# Support running s6 under a non-root user
&& mkdir -p /etc/services.d/nginx/supervise /etc/services.d/php-fpm7/supervise \
&& mkdir -p /etc/s6/services/nginx/supervise /etc/s6/services/php-fpm84/supervise \
&& mkfifo \
/etc/services.d/nginx/supervise/control \
/etc/services.d/php-fpm7/supervise/control \
/etc/s6/services/s6-fdholderd/supervise/control \
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
&& chown -R nobody.www-data /etc/services.d /etc/s6 /run /srv/* /var/lib/nginx /var/www \
/etc/s6/services/nginx/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
&& rm -rf "${GNUPGHOME}" /tmp/* \
&& apk del gnupg libcap
&& gpgconf --kill gpg-agent \
&& rm -rf /tmp/* composer.* \
&& apk del --no-cache gnupg git ${ALPINE_COMPOSER_PACKAGES}
COPY etc/ /etc/
WORKDIR /var/www
USER nobody:www-data
# user nobody, group www-data
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 80 8080
EXPOSE 8080
ENTRYPOINT ["/init"]
ENTRYPOINT ["/etc/init.d/rc.local"]

7
README.fs.md Normal file
View file

@ -0,0 +1,7 @@
# PrivateBin on Nginx, php-fpm & Alpine with file based 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 file based 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.

7
README.gcs.md Normal file
View file

@ -0,0 +1,7 @@
# PrivateBin on Nginx, php-fpm & Alpine with Google Cloud 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 Google Cloud 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.

218
README.md
View file

@ -1,44 +1,103 @@
# PrivateBin on nginx, php-fpm & alpine
# PrivateBin on Nginx, php-fpm & Alpine
**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).
This repository contains the Dockerfile and resources needed to create a docker image with a pre-installed PrivateBin instance in a secure default configuration. The images are based on the docker hub alpine image, extended with the GD module required to generate discussion avatars and the Nginx webserver to serve static JavaScript libraries, CSS & the logos. All logs of php-fpm and Nginx (access & errors) are forwarded to docker logs.
This repository contains the Dockerfile and resources needed to create a docker image with a pre-installed PrivateBin instance in a secure default configuration. The images are based on the docker hub Alpine image, extended with the GD module required to generate discussion avatars and the Nginx webserver to serve static JavaScript libraries, CSS & the logos. All logs of php-fpm and Nginx (access & errors) are forwarded to docker logs.
## Image variants
This is the all-in-one image ([Docker Hub](https://hub.docker.com/r/privatebin/nginx-fpm-alpine/) / [GitHub](https://github.com/orgs/PrivateBin/packages/container/package/nginx-fpm-alpine)) 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 (Docker Hub](https://hub.docker.com/r/privatebin/fs) / [GitHub](https://github.com/orgs/PrivateBin/packages/container/package/fs))
- [Image for PostgreSQL, MariaDB & MySQL (Docker Hub](https://hub.docker.com/r/privatebin/pdo) / [GitHub](https://github.com/orgs/PrivateBin/packages/container/package/pdo))
- [Image for Google Cloud Storage (Docker Hub](https://hub.docker.com/r/privatebin/gcs) / [GitHub](https://github.com/orgs/PrivateBin/packages/container/package/gcs))
- [Image for S3 Storage (Docker Hub](https://hub.docker.com/r/privatebin/s3) / [GitHub](https://github.com/orgs/PrivateBin/packages/container/package/s3))
## Image tags
All images contain a release version of PrivateBin and are offered with the following tags:
- `latest` is an alias of the latest pushed image, usually the same as `nightly`, but excluding `edge`
- `nightly` is the latest released PrivateBin version on an upgraded Alpine release image, including the latest changes from the docker image repository
- `edge` is the latest released PrivateBin version on an upgraded Alpine edge image
- `stable` contains the latest PrivateBin release on the latest tagged release of the [docker image git repository](https://github.com/PrivateBin/docker-nginx-fpm-alpine) - gets updated when important security fixes are released for Alpine or upon new Alpine releases
- `1.5.1` contains PrivateBin version 1.5.1 on the latest tagged release of the [docker image git repository](https://github.com/PrivateBin/docker-nginx-fpm-alpine) - gets updated when important security fixes are released for Alpine or upon new Alpine releases, same as stable
- `1.5.1-...` are provided for selecting specific, immutable images
If you update your images automatically via pulls, the `stable`, `nightly` or `latest` are recommended. If you prefer to have control and reproducability or use a form of orchestration, the numeric tags are probably preferable. The `edge` tag offers a preview of software in future Alpine releases and serves as an early warning system to detect image build issues in these.
## Image registries
These images are hosted on the Docker Hub and the GitHub container registries:
- [Images on Docker Hub](https://hub.docker.com/u/privatebin), which are prefixed `privatebin` or `docker.io/privatebin`
- [Images on GitHub](https://github.com/orgs/PrivateBin/packages), which are prefixed `ghcr.io/privatebin`
## Running the image
Assuming you have docker successfully installed and internet access, you can fetch and run the image from the docker hub like this:
```bash
docker run -d --restart="always" --read-only -p 8080:8080 -v privatebin-data:/srv/data privatebin/nginx-fpm-alpine
```console
$ docker run -d --restart="always" --read-only -p 8080:8080 -v $PWD/privatebin-data:/srv/data privatebin/nginx-fpm-alpine
```
The parameters in detail:
- `-v privatebin-data:/srv/data` - replace `privatebin-data` with the path to the folder on your system, where the pastes and other service data should be persisted. This guarantees that your pastes aren't lost after you stop and restart the image or when you replace it. May be skipped if you just want to test the image.
- `-v $PWD/privatebin-data:/srv/data` - replace `$PWD/privatebin-data` with the path to the folder on your system, where the pastes and other service data should be persisted. This guarantees that your pastes aren't lost after you stop and restart the image or when you replace it. May be skipped if you just want to test the image or use database or Google Cloud Storage backend.
- `-p 8080:8080` - The Nginx webserver inside the container listens on port 8080, this parameter exposes it on your system on port 8080. Be sure to use a reverse proxy for HTTPS termination in front of it in production environments.
- `--read-only` - This image supports running in read-only mode. Using this reduces the attack surface slightly, since an exploit in one of the images services can't overwrite arbitrary files in the container. Only /tmp, /var/tmp, /var/run & /srv/data may be written into.
- `-d` - launches the container in the background. You can use `docker ps` and `docker logs` to check if the container is alive and well.
- `--restart="always"` - restart the container if it crashes, mainly useful for production setups
> Note that the volume mounted must be owned by UID 65534 / GID 82. If you run the container in a docker instance with "userns-remap" you need to add your subuid/subgid range to these numbers.
>
> Note, too, that this image exposes the same service on port 80, for backwards compatibility with older versions of the image. To use port 80 with the current image, you either need to have a filesystem with extended attribute support so the nginx binary can be granted the capability to bind to ports below 1024 as non-root user or you need to start the image with user id 0 (root) using the parameter `-u 0`.
### Custom configuration
In case you want to use a customized [conf.php](https://github.com/PrivateBin/PrivateBin/blob/master/cfg/conf.sample.php) file, for example one that has file uploads enabled or that uses a different template, add the file as a second volume:
```bash
docker run -d --restart="always" --read-only -p 8080:8080 -v conf.php:/srv/cfg/conf.php:ro -v privatebin-data:/srv/data privatebin/nginx-fpm-alpine
```console
$ docker run -d --restart="always" --read-only -p 8080:8080 -v $PWD/conf.php:/srv/cfg/conf.php:ro -v $PWD/privatebin-data:/srv/data privatebin/nginx-fpm-alpine
```
Note: The `Filesystem` data storage is supported out of the box. The image includes PDO modules for MySQL, PostgreSQL and SQLite, required for the `Database` one, but you still need to keep the /srv/data persisted for the server salt and the traffic limiter.
Note: The `Filesystem` data storage is supported out of the box. The image includes PDO modules for MySQL and PostgreSQL, required for the `Database` one, but you still need to keep the /srv/data persisted for the server salt and the traffic limiter when using a release before 1.4.0.
### Adjusting nginx or php-fpm settings
#### Environment variables
You can attach your own `php.ini` or nginx configuration files to the folders `/etc/php7/conf.d/` and `/etc/nginx/conf.d/` respectively. This would for example let you adjust the maximum size these two services accept for file uploads, if you need more then the default 10 MiB.
The following variables do get passed down to the PHP application to support various scenarios. This allows changing some settings via the environment instead of a configuration file. Most of these relate to the storage backends:
### Timezone settings
##### Amazon Web Services variables used by the S3 backend
- `AWS_ACCESS_KEY_ID`
- `AWS_CONTAINER_AUTHORIZATION_TOKEN`
- `AWS_CONTAINER_CREDENTIALS_FULL_URI`
- `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`
- `AWS_DEFAULT_REGION`
- `AWS_PROFILE`
- `AWS_ROLE_ARN`
- `AWS_ROLE_SESSION_NAME`
- `AWS_SECRET_ACCESS_KEY`
- `AWS_SESSION_TOKEN`
- `AWS_STS_REGIONAL_ENDPOINTS`
- `AWS_WEB_IDENTITY_TOKEN_FILE`
- `AWS_SHARED_CREDENTIALS_FILE`
##### Google Cloud variables used by the GCS backend
- `GCLOUD_PROJECT`
- `GOOGLE_APPLICATION_CREDENTIALS`
- `GOOGLE_CLOUD_PROJECT`
- `PRIVATEBIN_GCS_BUCKET`
##### Custom backend settings
The following variables are not used by default, but can be [enabled in your custom configuration file](https://github.com/PrivateBin/docker-nginx-fpm-alpine/issues/196#issuecomment-2163331528), to keep sensitive information out of it:
- `STORAGE_HOST`
- `STORAGE_LOGIN`
- `STORAGE_PASSWORD`
- `STORAGE_CONTAINER`
##### Configuration folder
- `CONFIG_PATH`
##### Timezone settings
The image supports the use of the following two environment variables to adjust the timezone. This is most useful to ensure the logs show the correct local time.
@ -47,21 +106,144 @@ The image supports the use of the following two environment variables to adjust
Note: The application internally handles expiration of pastes based on a UNIX timestamp that is calculated based on the timezone set during its creation. Changing the PHP_TZ will affect this and leads to earlier (if the timezone is increased) or later (if it is decreased) expiration then expected.
### Adjusting nginx or php-fpm settings
You can attach your own `php.ini` or nginx configuration files to the folders `/etc/php/conf.d/` and `/etc/nginx/http.d/` respectively. This would for example let you adjust the maximum size these two services accept for file uploads, if you need more then the default 10 MiB.
### Kubernetes deployment
Below is an example deployment for Kubernetes.
```yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: privatebin-deployment
labels:
app: privatebin
spec:
replicas: 3
selector:
matchLabels:
app: privatebin
template:
metadata:
labels:
app: privatebin
spec:
securityContext:
runAsUser: 65534
runAsGroup: 82
fsGroup: 82
containers:
- name: privatebin
image: privatebin/nginx-fpm-alpine:stable
ports:
- containerPort: 8080
env:
- name: TZ
value: Antarctica/South_Pole
- name: PHP_TZ
value: Antarctica/South_Pole
securityContext:
readOnlyRootFilesystem: true
privileged: false
allowPrivilegeEscalation: false
livenessProbe:
httpGet:
path: /
port: 8080
readinessProbe:
httpGet:
path: /
port: 8080
volumeMounts:
- mountPath: /srv/data
name: privatebin-data
readOnly: False
- mountPath: /run
name: run
readOnly: False
- mountPath: /tmp
name: tmp
readOnly: False
- mountPath: /var/lib/nginx/tmp
name: nginx-cache
readOnly: False
volumes:
- name: run
emptyDir:
medium: "Memory"
- name: tmp
emptyDir:
medium: "Memory"
- name: nginx-cache
emptyDir: {}
```
Note that the volume `privatebin-data` has to be a shared, persisted volume across all nodes, i.e. on an NFS share. As of PrivateBin 1.4.0 it is no longer required, when using a database or Google Cloud Storage.
## Running administrative scripts
The image includes two administrative scripts, which you can use to migrate from one storage backend to another, delete pastes by ID, removing empty directories when using the Filesystem backend, to purge all expired pastes and display statistics. These can be executed within the running image or by running the commands as alternative entrypoints with the same volumes attached as in the running service image, the former option is recommended.
```console
# assuming you named your container "privatebin" using the option: --name privatebin
$ docker exec -t privatebin administration --help
Usage:
administration [--delete <paste id> | --empty-dirs | --help | --purge | --statistics]
Options:
-d, --delete deletes the requested paste ID
-e, --empty-dirs removes empty directories (only if Filesystem storage is
configured)
-h, --help displays this help message
-p, --purge purge all expired pastes
-s, --statistics reads all stored pastes and comments and reports statistics
$ docker exec -t privatebin migrate --help
migrate - Copy data between PrivateBin backends
Usage:
migrate [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir
[<dstconfdir>]
migrate [-h|--help]
Options:
--delete-after delete data from source after all pastes and comments have
successfully been copied to the destination
--delete-during delete data from source after the current paste and its
comments have successfully been copied to the destination
-f forcefully overwrite data which already exists at the
destination
-h, --help displays this help message
-n dry run, do not copy data
-v be verbose
<srcconfdir> use storage backend configuration from conf.php found in
this directory as source
<dstconfdir> optionally, use storage backend configuration from conf.php
found in this directory as destination; defaults to:
/srv/bin/../cfg/conf.php
```
Note that in order to migrate between different storage backends you will need to use the all-in-one image called `privatebin/nginx-fpm-alpine`, as it comes with all the drivers and libraries for the different supported backends. When using the variant images, you will only be able to migrate within two backends of the same storage type, for example two filesystem paths or two database backends.
## Rolling your own image
To reproduce the image, run:
```bash
docker build -t privatebin/nginx-fpm-alpine .
```console
$ docker build -t privatebin/nginx-fpm-alpine .
```
### Behind the scenes
The two processes, Nginx and php-fpm, are started by s6 overlay.
The two processes, Nginx and php-fpm, are started by s6.
Nginx is required to serve static files and caches them, too. Requests to the index.php (which is the only PHP file exposed in the document root at /var/www) are passed to php-fpm via a socket at /run/php-fpm.sock. All other PHP files and the data are stored under /srv.
The Nginx setup supports only HTTP, so make sure that you run a reverse proxy in front of this for HTTPS offloading and reducing the attack surface on your TLS stack. The Nginx in this image is set up to deflate/gzip text content.
During the build of the image the PrivateBin release archive and the s6 overlay binaries are downloaded from Github. All the downloaded Alpine packages, s6 overlay binaries and the PrivateBin archive are validated using cryptographic signatures to ensure they have not been tempered with, before deploying them in the image.
During the build of the image, the PrivateBin release archive is downloaded from Github. All the downloaded Alpine packages and the PrivateBin archive are validated using cryptographic signatures to ensure they have not been tempered with, before deploying them in the image.

7
README.pdo.md Normal file
View file

@ -0,0 +1,7 @@
# PrivateBin on Nginx, php-fpm & Alpine with PostgreSQL, MariaDB & MySQL 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 PostgreSQL, MariaDB & MySQL storage backends. 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.

7
README.s3.md Normal file
View file

@ -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.

105
buildx.sh Executable file
View file

@ -0,0 +1,105 @@
#!/bin/bash
# exit immediately on non-zero return code, including during a pipe stage or on
# accessing an uninitialized variable and print commands before executing them
set -euxo pipefail
EVENT="$1"
IMAGE="$2"
EDGE=false
[ "$3" = edge ] && EDGE=true
build_image() {
# shellcheck disable=SC2068
docker build \
--pull \
--no-cache \
--load \
$@ \
.
}
push_image() {
# shellcheck disable=SC2068
docker buildx build \
--platform linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--pull \
--no-cache \
--push \
--provenance=false \
$@ \
.
}
is_image_push_required() {
[ "${EVENT}" != pull_request ] && { \
[ "${GITHUB_REF}" != refs/heads/master ] || \
[ "${EVENT}" = schedule ]
}
}
main() {
local TAG BUILD_ARGS IMAGE_TAGS
if [ "${EVENT}" = schedule ] ; then
TAG=nightly
else
TAG=${GITHUB_REF##*/}
fi
case "${IMAGE}" in
fs)
BUILD_ARGS="--build-arg ALPINE_PACKAGES= --build-arg COMPOSER_PACKAGES="
;;
gcs)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php84-openssl --build-arg COMPOSER_PACKAGES=google/cloud-storage"
;;
pdo)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php84-pdo_mysql,php84-pdo_pgsql --build-arg COMPOSER_PACKAGES="
;;
s3)
BUILD_ARGS="--build-arg ALPINE_PACKAGES=php84-curl,php84-mbstring,php84-openssl,php84-simplexml --build-arg COMPOSER_PACKAGES=aws/aws-sdk-php"
;;
*)
BUILD_ARGS=""
;;
esac
IMAGE="privatebin/${IMAGE}"
IMAGE_TAGS="--tag ${IMAGE}:latest --tag ${IMAGE}:${TAG} --tag ${IMAGE}:${TAG%%-*} --tag ghcr.io/${IMAGE}:latest --tag ghcr.io/${IMAGE}:${TAG} --tag ghcr.io/${IMAGE}:${TAG%%-*}"
if [ "${EDGE}" = true ] ; then
# build from alpine:edge instead of the stable release
sed -e 's/^FROM alpine:.*$/FROM alpine:edge/' Dockerfile > Dockerfile.edge
BUILD_ARGS+=" -f Dockerfile.edge"
# replace the default tags, build just the edge one
IMAGE_TAGS="--tag ${IMAGE}:edge --tag ghcr.io/${IMAGE}:edge"
IMAGE+=":edge"
else
if [ "${EVENT}" = push ] ; then
# append the stable tag on explicit pushes to master or (git) tags
IMAGE_TAGS+=" --tag ${IMAGE}:stable --tag ghcr.io/${IMAGE}:stable"
fi
# always build latest on non-edge builds
IMAGE+=":latest"
fi
build_image "${BUILD_ARGS} ${IMAGE_TAGS}"
docker run -d --rm -p 127.0.0.1:8080:8080 --read-only --name smoketest "${IMAGE}"
sleep 5 # give the services time to start up and the log to collect any errors that might occur
test "$(docker inspect --format="{{.State.Running}}" smoketest)" = true
curl --silent --show-error -o /dev/null http://127.0.0.1:8080/
if docker logs smoketest 2>&1 | grep -i -E "warn|emerg|fatal|panic|error"
then
exit 1
fi
docker stop smoketest
if is_image_push_required ; then
push_image "${BUILD_ARGS} ${IMAGE_TAGS}"
fi
rm -f Dockerfile.edge "${HOME}/.docker/config.json"
}
[ "$(basename "$0")" = 'buildx.sh' ] && main

3
etc/init.d/rc.local Executable file
View file

@ -0,0 +1,3 @@
#!/bin/execlineb -P
foreground { cp -r /etc/s6/services /run }
s6-svscan /run/services

View file

@ -0,0 +1,44 @@
server {
listen 8080 default_server;
listen [::]:8080 default_server;
root /var/www;
index index.php index.html index.htm;
location / {
# no-transform tells Cloudflare and others to not change the content of
# the file and thus breaking SRI.
# https://developers.cloudflare.com/cache/about/cache-control#other
add_header Cache-Control "public, max-age=3600, must-revalidate, no-transform";
add_header Cross-Origin-Embedder-Policy require-corp;
# disabled, because it prevents links from a paste to the same site to
# be opened. Didn't work with `same-origin-allow-popups` either.
# See issue #109 for details.
#add_header Cross-Origin-Opener-Policy same-origin;
add_header Cross-Origin-Resource-Policy same-origin;
add_header Referrer-Policy no-referrer;
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options deny;
add_header X-XSS-Protection "1; mode=block";
# Uncomment to enable HSTS
# https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
include /etc/nginx/location.d/*.conf;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include /etc/nginx/location.d/*.conf;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# Prevent exposing nginx + version to $_SERVER
fastcgi_param SERVER_SOFTWARE "";
}
include /etc/nginx/server.d/*.conf;
}

View file

@ -1,6 +1,3 @@
# Run as a unique, less privileged user for security reasons.
user nobody www-data;
# Sets the worker threads to the number of CPU cores available in the system for best performance.
# Should be > the number of CPU cores.
# Maximum number of connections = worker_processes * worker_connections
@ -70,6 +67,5 @@ http {
client_max_body_size 15M;
# Load even moar configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;
include /etc/nginx/http.d/*.conf;
}

View file

@ -1,25 +0,0 @@
server {
listen 80 default_server;
listen 8080 default_server;
root /var/www;
index index.php index.html index.htm;
location / {
include /etc/nginx/location.d/*.conf;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include /etc/nginx/location.d/*.conf;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# Prevent exposing nginx + version to $_SERVER
fastcgi_param SERVER_SOFTWARE "";
}
include /etc/nginx/server.d/*.conf;
}

View file

@ -1 +0,0 @@
/etc/nginx/sites-available/site.conf

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

@ -0,0 +1,43 @@
[global]
daemonize = no
error_log = /dev/stderr
[www]
listen = /run/php-fpm.sock
access.log = /dev/null
clear_env = On
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
; Amazon Web Services variables used with S3 backend
env[AWS_ACCESS_KEY_ID] = $AWS_ACCESS_KEY_ID
env[AWS_CONTAINER_AUTHORIZATION_TOKEN] = $AWS_CONTAINER_AUTHORIZATION_TOKEN
env[AWS_CONTAINER_CREDENTIALS_FULL_URI] = $AWS_CONTAINER_CREDENTIALS_FULL_URI
env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI] = $AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
env[AWS_DEFAULT_REGION] = $AWS_DEFAULT_REGION
env[AWS_PROFILE] = $AWS_PROFILE
env[AWS_ROLE_ARN] = $AWS_ROLE_ARN
env[AWS_ROLE_SESSION_NAME] = $AWS_ROLE_SESSION_NAME
env[AWS_SECRET_ACCESS_KEY] = $AWS_SECRET_ACCESS_KEY
env[AWS_SESSION_TOKEN] = $AWS_SESSION_TOKEN
env[AWS_STS_REGIONAL_ENDPOINTS] = $AWS_STS_REGIONAL_ENDPOINTS
env[AWS_WEB_IDENTITY_TOKEN_FILE] = $AWS_WEB_IDENTITY_TOKEN_FILE
env[AWS_SHARED_CREDENTIALS_FILE] = $AWS_SHARED_CREDENTIALS_FILE
; allows changing the default configuration path
env[CONFIG_PATH] = $CONFIG_PATH
; Google Cloud variables used with GCS backend
env[GCLOUD_PROJECT] = $GCLOUD_PROJECT
env[GOOGLE_APPLICATION_CREDENTIALS] = $GOOGLE_APPLICATION_CREDENTIALS
env[GOOGLE_CLOUD_PROJECT] = $GOOGLE_CLOUD_PROJECT
env[PRIVATEBIN_GCS_BUCKET] = $PRIVATEBIN_GCS_BUCKET
; allow using custom backend settings
env[STORAGE_HOST] = $STORAGE_HOST
env[STORAGE_LOGIN] = $STORAGE_LOGIN
env[STORAGE_PASSWORD] = $STORAGE_PASSWORD
env[STORAGE_CONTAINER] = $STORAGE_CONTAINER

View file

@ -1,18 +0,0 @@
[global]
pid = /run/php-fpm7.pid
daemonize = no
error_log = /dev/stderr
[www]
user = nobody
group = www-data
listen = /run/php-fpm.sock
listen.owner = nobody
listen.group = www-data
access.log = /dev/null
clear_env = On
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

9
etc/s6/services/nginx/run Executable file
View file

@ -0,0 +1,9 @@
#!/bin/execlineb -P
forx -o 127 timer { 0 1 2 3 4 5 6 7 8 9 }
ifelse {
test -S /var/run/php-fpm.sock
} {
/usr/sbin/nginx
}
foreground { sleep 1 }
exit 127

2
etc/s6/services/php-fpm84/run Executable file
View file

@ -0,0 +1,2 @@
#!/bin/execlineb -P
/usr/sbin/php-fpm84

View file

@ -1,2 +0,0 @@
#!/usr/bin/execlineb -P
/usr/sbin/nginx

View file

@ -1,2 +0,0 @@
#!/usr/bin/execlineb -P
/usr/sbin/php-fpm7

41
release.asc Normal file
View file

@ -0,0 +1,41 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFtqB6oBEADM2ydU1BWvAVGbAj6Q8eLEbiXcHAAGdYu6DgQVQo0tsUejbBOj
4YCAjwl8vShGMUlJoXGvR+WOrkB9OHWpl9uI+hS0R6RX7PxF4GpNtO7cnQcAUHc9
WauAgAfu+3n8t9FRDIzT2lPuSjLFEvmVixfNa41nMG5Zuzf45mJlvTe3CwY85eBW
uWzTKDhCcv+ETdsQGsSCVRqyPztNL9eE6JaNGpxhmGqe9M09DxC73wR/va8zGjrD
uIsxhKRPb7XQaH0nI+s8r+EsWezZD2UNL7Zp3ID6KSVVcYbqXLY/cz4eEVg4hnIJ
WP8OIMPftqXJRt71F13GrtzKE8YXhEo7IE2WcbLCICzD1ZAj1sJizEaXKdSKuAK8
AL9d9K2PhnzaprKKjLd9TYdeqL9bsRW/il6OrCWvSzevbkX1Z/xU3eeQF4OUrqKe
JddwDqULm7UkL5niFXEFtMXSVLV9ppVU4s2jX7pz+JGyce1S9Nbf+kGT7Ks69XS7
+ves1uynu8UtBQjv0Xc+NFuzYmthfvB7zvpMTk6nNtN3PpxX8NvcJffR5zNkr15a
2I2+IELhYzGmp1xZeW1kykARX4M4ZD9GW/tAA+5zDoWGdmQv3Zw1ifLieyfhMmKh
5wrQQ6wlM5MCoj1YY4WvnyD68ac/3WTCPKmDtNcXhj3E3tfhDvFKKPXTZQARAQAB
tDVQcml2YXRlQmluIHJlbGVhc2UgKHNvbGVseSB1c2VkIGZvciBzaWduaW5nIHJl
bGVhc2VzKYkCOAQTAQIAIgIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAltq
ev0ACgkQ4Rt5UOnhg9u9RQ/+O1R+dMqCTr8iaW7lkdiEEXohy5efUjlqexL+4WRF
/97X4WCEOYNPsUkcOerTCQ8SZlMBLRTQmrTVaKn3Yd0fonMFeDGNyGbuCvWZr96r
6hPbEkXCbD9rBAvhbcAYTCsQyYNtq9DY26PJHd5nOBVoDb4sWkjn5i+/ECKGAjDq
yuvNbB+kjiyBeg8ph6o60m78RL/4wWoGGwBuijaNu1m4WFqneRNz0V+GfNjsPwoh
+XSNBj1C3+Ys9qn3EakLfmmKFkNOBIGyiaWam9c+Anj8w0eC5GlFslTVlx7OpEse
zTP9dCsFoDfpxQT6Fnx128uBGrry5s40fy2hjc3t+RAWWfgkRNupCD7eXeD71EtL
cCvkNPrcCBYAf/0YgbZGmh5HzHnBjPxNYuG/sjIDBPiXWqp0a4legbkWj7WADGv2
AhspjkUzjnq7yEEu93LnXDvC9nxkUwU5uLWiWkzC4T1+fid5w5+gwNGt7BuG1nzo
ok8SjdHUa3h1N6U9/BLExgM8ptmqxkdT6sAhfPmRKTh483aF4NQChNFBBEUUWR8z
HhAC4GUjhMODtqx1o9+HjPBHtt4tiiPwzcR6zef4nKyi0Y3jrfoGnjWQ1z5JrGqT
mySsBdQ1rmA3N7T3LlDDAr/V6Gvu3aX4PIwNEoxq9gP+XWGpQkd0AxKn2Dvob3jG
iaiJAhwEEAECAAYFAltqfCkACgkQD1yUCmvYH5KxhQ/+O0QmI0HBq404A5Q50P0g
r/f6K33SNuBrC+qrmcshCNGC8AW6dryDvY2+caJx4oeoV4ToBoECPgWwHvUJgF5d
UWBI8gh1Wxs3XSrf++9kmIfoezH8RHsXa03QGCU7AS+0M3zsQjk4dBwRXfwf8/PJ
5tMkkou1sSfFHuAQdjVMzC32Qdru0jaK/HU/Gx/oPoL4obCfniAc8koKDXLHbIYI
FKc3V1jpNShE++yvv3TEr4GDI+DkAkkH1d15pETd331GXrN8djorLMKooS7eJWiU
WMetHUfPAALQImo1wAROQUf5O/2yN+t5HsId9RPQopUtYGf1BIUelSoKU9bn0pMh
yonKR8zCx7VWnIXxoR6fkhGoW/v5XyomthjYKom8Ok1HLPM8/mCRyPSNq3cp/B7n
fcdMkTKc9h9Tv004PA4BjNtVycK34Gj2GsjSzr5THiagsNzvIIfmDKjTirOdXtRA
5/oRKgTNEAz/qT9Y3EfmFni4cq3JBU7sQq6BEy48J4HSrjEVlzwNbXFeT/LTDNKX
wj1GgSM3vK3y1Pt1fH9aKTRL1Awahtn4+LTUrnm7Iq+Kq74n7MtA6WQNy+RjS4DO
9qfhtuJa4Pa4Y/KFc4JoBcsvI7B1PYE2xRRYLBQJak31PIK0+/7gn6mGpMkLRSO8
PIP40VAkZWr13GxsW+c+2fE=
=zwiR
-----END PGP PUBLIC KEY BLOCK-----