Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

preview for videos - include ffmpeg in the dockerfile/image #278

Open
wants to merge 345 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
345 commits
Select commit Hold shift + click to select a range
57230ff
[nextcloud] fix permissions check
hoellen Jul 29, 2018
5b66db9
update alpine images to 3.8
hoellen Jul 30, 2018
503f526
adding signature check for PrivateBin archive
elrido Aug 1, 2018
7be188f
securing PrivateBin installation, by moving unneccessary bits out of …
elrido Aug 1, 2018
e93e922
[nextcloud] update to nextcloud 14.0-beta2
hoellen Aug 4, 2018
f644eda
[nextcloud] update to nextcloud 14.0-beta3
hoellen Aug 9, 2018
5b80a33
Merge remote-tracking branch 'hoellen/master'
elrido Aug 11, 2018
038d886
release 1.2.1
elrido Aug 11, 2018
a785f9c
Merge pull request #11 from elrido/master
hoellen Aug 12, 2018
e95e259
update README
hoellen Aug 12, 2018
0ee2ff6
[nextcloud] update to nextcloud 14.0-beta4
hoellen Aug 16, 2018
0d3ba86
[nginx-php] update php to 7.2.9 and 7.1.21
hoellen Aug 16, 2018
95a24c2
[nextcloud] update to nextcloud 14.0.0 RC1
hoellen Aug 25, 2018
502cf8e
[nginx-php][boring-nginx] update nginx to 1.15.3
hoellen Aug 28, 2018
b35e77e
[matomo] update to 3.6.0
hoellen Aug 29, 2018
9fefa33
[nextcloud] update nextcloud to 13.0.6 and 12.0.11
hoellen Aug 30, 2018
18557b4
removed tls1.3 patch for boring-nginx because wih nginx 1.15.3 it wor…
hoellen Aug 30, 2018
d7ba408
fix prev commit. remove the right patch
hoellen Aug 30, 2018
7750ed0
update nextcloud to 14.0-RC2
hoellen Aug 31, 2018
d61466f
update nextcloud to final 14.0
hoellen Sep 6, 2018
d38e918
change referrer policy from same-origin to strict-origin
hoellen Sep 6, 2018
b45c72b
fix dynamic tls patch (offset) and copy fixed patch to repository
hoellen Sep 7, 2018
4fa08f5
fix merge for fix-dynamic-tls
hoellen Sep 7, 2018
0d8c8d4
update php to 7.1.22 and 7.2.10
hoellen Sep 14, 2018
12e6dfb
update nextcloud to 14.0.1
hoellen Sep 25, 2018
07fc3e3
update nextcloud opcache settings
hoellen Sep 25, 2018
b3464c0
update nextcloud readme
hoellen Sep 25, 2018
7cda0dc
update nginx to 1.15.4
hoellen Sep 25, 2018
5c35737
fix dynamic tls patch for boring-nginx
hoellen Sep 26, 2018
0e60b8b
update nginx to 1.15.5
hoellen Oct 3, 2018
639935a
update all nextcloud versions and php
hoellen Oct 12, 2018
c9345af
update matomo to 3.6.1
hoellen Oct 18, 2018
802357d
fix warning in nextcloud setup check
hoellen Oct 31, 2018
0de180e
update nginx to 1.15.6
hoellen Nov 6, 2018
679bcbe
update nginx to 7.2.12 and 7.1.24
hoellen Nov 8, 2018
5600fcb
add nextcloud v15.0-beta1
hoellen Nov 13, 2018
3a3cbda
update nextcloud to 15.0-beta2
hoellen Nov 15, 2018
4ae8391
update matomo to 3.7.0
hoellen Nov 19, 2018
094f934
update nextcloud to 12.0.13, 13.0.8, 14.0.4 and 15.0.0RC1
hoellen Nov 22, 2018
be82d35
fix build error for searx
hoellen Nov 27, 2018
6eede55
update nextcloud to 15.0.0-RC2
hoellen Nov 30, 2018
f911f23
add new php version 7.3.0 and update to 7.2.13 and 7.1.25. PHP 7.1 wi…
hoellen Dec 6, 2018
190a3e9
update nextcloud to 15.0.0-RC3
hoellen Dec 6, 2018
d7b87e5
revert nextcloud 15.0 to php 7.2
hoellen Dec 6, 2018
17225d4
update nextcloud to final release 15.0.0
hoellen Dec 10, 2018
30922ce
remove nextcloud 12.0 (EOL)
hoellen Dec 10, 2018
b8e5cb5
update nginx config for nextcloud
hoellen Dec 10, 2018
425d82c
update nextcloud README.md
hoellen Dec 10, 2018
db56b15
add imagemagick to nextcloud 15
hoellen Dec 10, 2018
f9e5ab0
Add missing service discovery in nginx config
waja Dec 12, 2018
0d1c2cc
Merge pull request #16 from waja/service_discovery
hoellen Dec 13, 2018
93678ce
use php 7.3 for nextcloud 15 (php-smbclient is now available for php 7.3
hoellen Dec 25, 2018
09ca44c
fix boring-nginx build error
hoellen Dec 25, 2018
0d2c24a
fix build error php 7.3 (libzip)
hoellen Dec 26, 2018
4f08924
enable imagick for nextcloud daily
hoellen Dec 26, 2018
1d2fecc
revert php for nextcloud 15 (php 7.2).
hoellen Dec 26, 2018
b5b5c39
fix typo
hoellen Dec 26, 2018
b160d73
PHP zip extension needs libzip.so.5 at runtime (Fixes: #17)
waja Dec 27, 2018
fc9e58c
Merge pull request #19 from waja/fix_libzip
hoellen Dec 28, 2018
cd303fb
update nextcloud 15 to php 7.3
hoellen Dec 28, 2018
64c40bb
Merge branch 'master' of https://github.com/hoellen/dockerfiles
hoellen Dec 28, 2018
49137cc
update README
hoellen Dec 29, 2018
51f0657
update searx to 0.15.0
hoellen Jan 6, 2019
68e9972
Disable fastcgi_intercept_errors to fix CARDDAV on OSX.
waja Jan 8, 2019
e73d6f6
Merge pull request #20 from waja/osx_carddav
hoellen Jan 8, 2019
3548dcf
update PHP to 7.3.1 and 7.2.14. Remove PHP 7.1
hoellen Jan 10, 2019
6d62214
bumped all Versions by two
Jan 11, 2019
eb3cee2
Merge pull request #21 from mwlczk/bumpVersions
hoellen Jan 11, 2019
969dd3e
update alpine based image to alpine 3.9
hoellen Jan 30, 2019
feab2f3
Merge branch 'master' of https://github.com/hoellen/dockerfiles
hoellen Jan 30, 2019
634bafb
disable jemalloc for boring-nginx (alpine doesn't support it in 3.9)
hoellen Feb 1, 2019
7e0b858
upgrade python to version 3 in searx image and fix build error
hoellen Feb 1, 2019
89c9e4f
use openssl for nginx-php (alpine 3.9)
hoellen Feb 1, 2019
ac25c07
remove comment
hoellen Feb 1, 2019
f992108
update php to 7.3.2 and 7.2.15
hoellen Feb 5, 2019
3b5dd65
update nextcloud to 13.0.11, 14.0.7 and 15.0.4
hoellen Feb 7, 2019
b402128
update nginx to 1.15.8
hoellen Feb 7, 2019
934ce89
update dynamic_records.patch for boring nginx
hoellen Feb 7, 2019
91abfcb
remove pip downgrade, issue is fixed (pypa/pip#6197)
hoellen Feb 9, 2019
fa7ed68
update readme
hoellen Feb 16, 2019
3dcf532
Update nextclout to 13.0.12, 14.0.8 and 15.0.5
waja Feb 28, 2019
a04c7be
Merge pull request #24 from waja/15.0.5
hoellen Feb 28, 2019
9523e3a
Merge branch 'master' of https://github.com/hoellen/dockerfiles
hoellen Feb 28, 2019
d5ddd86
add ocm-provider in nginx
sbaerlocher Mar 6, 2019
a06b859
remove backslash
sbaerlocher Mar 6, 2019
8a3c320
Merge pull request #26 from itigoag/add-ocm-provider-in-nginx
hoellen Mar 6, 2019
91fada5
upadte php to 7.2.16 and 7.3.3
hoellen Mar 21, 2019
f630ac6
update nginx to 1.15.10
hoellen Mar 26, 2019
e5ca67f
update matomo to 3.9.1
hoellen Mar 26, 2019
ea8ce6e
update README and Nextcloud to 14.0.9 and 15.0.6.
hoellen Apr 4, 2019
709e497
update php to 7.2.17 and 7.3.4
hoellen Apr 4, 2019
f246155
update nextcloud to 14.0.10 and 15.0.7
hoellen Apr 9, 2019
3e59eb5
update nginx to 1.15.11
hoellen Apr 9, 2019
9416335
combine ocm-provider and ocs-provider
hoellen Apr 12, 2019
9ae3e67
add Nextcloud 16.0 RC1
hoellen Apr 12, 2019
d660264
update nginx to 1.15.12
hoellen Apr 16, 2019
8c30a9b
Update Nextcloud to 16.0-RC2
hoellen Apr 18, 2019
2471d01
update Nextcloud to final 16.0
hoellen Apr 25, 2019
e4afdbd
update nginx to 1.15.12
hoellen Apr 25, 2019
205b912
update php to 7.2.18 and 7.3.5
hoellen May 2, 2019
d629756
update README
hoellen May 14, 2019
f8b043c
update Nextcloud to 14.0.11, 15.0.8 and 16.0.1
hoellen May 16, 2019
5973419
Add searx build for the master branch
hoellen May 16, 2019
f2865ed
update nginx to 1.17.0
hoellen May 21, 2019
012a5dc
update php to 7.2.19 and 7.3.6
hoellen May 30, 2019
c9ce09f
update alpine to 3.10
hoellen Jun 20, 2019
c29f193
update nginx to 1.17.1
hoellen Jun 25, 2019
0d2695e
use php 7.3 image and update matomo to 3.10.0
hoellen Jul 4, 2019
d96979b
update nextcloud to 16.0.2, 15.0.9 and 14.0.13
hoellen Jul 4, 2019
9b789a7
update php to 7.3.7 and 7.2.20
hoellen Jul 4, 2019
68a9194
[nextcloud] update to 16.0.3, 15.0.10
ziirish Jul 9, 2019
4c4bc43
Merge pull request #28 from ziirish/nc-update
hoellen Jul 9, 2019
e771fe2
update privatebin to 1.3
hoellen Jul 9, 2019
1514a0e
update README
hoellen Jul 11, 2019
0eee50e
update matomo to 3.11.0
hoellen Jul 24, 2019
28e4016
update php (7.2.21, 7.3.8), nginx (1.17.2) and libiconv (1.16)
hoellen Jul 31, 2019
cf3b8c5
add argon2 support
hoellen Aug 13, 2019
2553428
Update nginx to 1.17.3
hoellen Aug 14, 2019
3bcf82e
update Nextcloud to 14.0.14, 15.0.11 and 16.0.4
hoellen Aug 14, 2019
2dd89f7
add Nextcloud 17.0.0-beta2
hoellen Aug 23, 2019
aeb6ce8
update Nextcloud to 17.0-beta3
hoellen Aug 31, 2019
31de055
update PHP to 7.2.22 and 7.3.9
hoellen Aug 31, 2019
14afc3b
update Nextcloud to 17.0-beta4
hoellen Sep 5, 2019
be4eff0
update Nextcloud to 17.0-RC1
hoellen Sep 12, 2019
075f365
update nginx config
hoellen Sep 13, 2019
5fe4185
update Nextcloud to 17.0-RC2
hoellen Sep 19, 2019
adfcd9e
update Privatebin to 1.3.1
hoellen Sep 23, 2019
06f1863
update nginx to 1.17.4
hoellen Sep 25, 2019
b1c9aea
Nextcloud 14 EOL
hoellen Sep 25, 2019
092e314
update Nextcloud to 15.0.12, 16.0.5 and final 17.0.0
hoellen Sep 25, 2019
c0e8fb4
Remove PHP 7.2
hoellen Sep 25, 2019
7644065
update README
hoellen Sep 26, 2019
ed79906
add X-Frame-Options header to nginx conf
hoellen Sep 26, 2019
ea069ac
update php to 7.3.10
hoellen Sep 26, 2019
f0e27e1
remove X-Frame-Options header for Nextcloud 16 and 15
hoellen Sep 30, 2019
c37cc09
Update PHP to 7.3.11
hoellen Oct 24, 2019
c206665
harden nextcloud nginx config
hoellen Oct 24, 2019
830df3e
update Matomo to 3.12.0
hoellen Oct 30, 2019
f59f227
Update Nextcloud to 15.0.13, 16.0.6 and 17.0.1
hoellen Nov 6, 2019
8ee6cc8
Update nginx to 1.17.6
hoellen Nov 19, 2019
3da0ffe
update php to 7.3.12
hoellen Nov 21, 2019
a2deb68
Update Matomo to 3.13.0
hoellen Nov 27, 2019
4cc9d87
update Nextcloud to 17.0.2, 16.0.7 and 15.0.14
hoellen Dec 19, 2019
9dd745d
update PHP to 7.3.13
hoellen Dec 19, 2019
0c67416
Update base Alpine image to 3.11
hoellen Dec 19, 2019
3ee290e
Update nginx to 1.17.7
hoellen Dec 25, 2019
2240c12
Update PrivateBin to 1.3.2
hoellen Jan 13, 2020
65c01c6
Add Nextcloud 18.0
hoellen Jan 16, 2020
0a645c1
Update README and remove Nextcloud 15
hoellen Jan 20, 2020
179fbd2
Update nginx to 1.17.8
hoellen Jan 23, 2020
c60c4ab
Update PHP to 7.3.14
hoellen Jan 23, 2020
8f84b03
Update Nextcloud README
hoellen Jan 27, 2020
71cc051
Update searx to 0.16
hoellen Jan 30, 2020
b4c2c80
Update Nextcloud to 16.0.8 and 17.0.3
hoellen Jan 30, 2020
a981ded
Change proxy header from $host to $http_host
hoellen Feb 7, 2020
c100c65
Update Nextcloud to 18.0.1
hoellen Feb 13, 2020
0f36f1d
Update PrivateBin to 1.3.3
hoellen Feb 16, 2020
1ba8868
Update PHP to 7.3.15
hoellen Feb 20, 2020
fbffe38
Update nginx to 1.17.9
hoellen Mar 3, 2020
04ba50d
Update Nextcloud to 18.0.2, 17.0.4, 16.0.9
hoellen Mar 11, 2020
6a62750
Update PrivateBin to 1.3.4
hoellen Mar 22, 2020
2339644
Update Nextcloud to 18.0.3 and 17.0.5
hoellen Mar 24, 2020
57364b9
Update nginx to 1.17.10
hoellen Apr 15, 2020
1d553e5
Update PHP to 7.3.17
hoellen Apr 16, 2020
4c13145
Update Nextcloud to 18.0.4, 17.0.6 and 16.0.10
hoellen Apr 23, 2020
c8998c3
Use nginx stable releases
hoellen Apr 24, 2020
f0e7816
Update nginx config
hoellen Apr 27, 2020
9254ace
Update PHP to 7.3.18
hoellen May 14, 2020
8315df0
Add bcmath package to nginx-php
hoellen May 21, 2020
bded641
Add new Nextcloud version 19-RC3
hoellen May 21, 2020
7305880
generate instanceid non-deterministically
hoellen May 25, 2020
13b16b9
Update README
hoellen May 25, 2020
65ed611
Update Nextcloud nginx.conf
hoellen May 25, 2020
fc873db
Update Alpine to 3.12
hoellen May 30, 2020
b1d6464
Update Nextcloud to final 19.0.0
hoellen Jun 3, 2020
b650e65
Revert nginx webdav config
hoellen Jun 3, 2020
d24f862
Install pip to fix build
hoellen Jun 5, 2020
4df51f8
Fix build error
hoellen Jun 5, 2020
40cbbda
Update Nextcloud to 18.0.5, 17.0.7 and 16.0.11
hoellen Jun 5, 2020
743280f
Update README
hoellen Jun 5, 2020
3d666f9
Update Nextcloud to 18.0.6
hoellen Jun 9, 2020
d7be9e8
Update PHP to 7.3.19
hoellen Jun 12, 2020
eb80828
Change default cron period to 5 minutes
hoellen Jun 19, 2020
4275ecf
Add ffmpeg
hoellen Jun 19, 2020
62af8f5
Add PHP 7.4
hoellen Jun 20, 2020
eda8a6e
Use PHP 7.4 for Nextcloud 19.0
hoellen Jun 20, 2020
832c073
Sync daily Dockerfile with 19.0
hoellen Jun 20, 2020
5caafcd
Fix SVG convert for mail
hoellen Jun 28, 2020
e7be762
Update searx to 0.17.0
hoellen Jul 9, 2020
2df2b86
Update PHP
hoellen Jul 9, 2020
d5cf747
Update Nextcloud to 19.0.1, 18.0.7 and 17.0.8
hoellen Jul 16, 2020
3e8854d
Fix deletion of python requests module (#40)
hoellen Jul 20, 2020
dbcd8dc
Update PHP to 7.4.9 and 7.3.21
hoellen Aug 6, 2020
cdd79d6
Update Nextcloud to 19.0.2, 18.0.8 and 17.0.9
hoellen Aug 27, 2020
197ebea
Update PHP to 7.4.10 and 7.3.22
hoellen Sep 3, 2020
b0dd747
Update Nextcloud to 19.0.3 and 18.0.9
hoellen Sep 10, 2020
b7860ff
Add Nextcloud 20-RC1
hoellen Sep 18, 2020
c8cbf67
Update Nextcloud 20.0-RC2
hoellen Sep 24, 2020
53d416f
Update PHP to 7.4.11 and 7.3.23
hoellen Oct 1, 2020
2944908
Add Nextcloud 20.0 - Final Release
hoellen Oct 3, 2020
582a14d
Version 17 is EOL and 20 is the new stable
waja Oct 5, 2020
5f65a6a
Use temporary PHP 7.3 for Nextcloud images
hoellen Oct 6, 2020
53f390a
Update Nextcloud to 19.0.4, 18.0.10 and 17.0.10
hoellen Oct 9, 2020
0c609dc
Update Nextcloud to 20.0.1
hoellen Oct 25, 2020
ffb0086
Update PHP to 7.4.12 and 7.3.24
hoellen Nov 2, 2020
c76a3cb
Update Nextcloud to 20.0.2, 19.0.5 and 18.0.11
hoellen Nov 19, 2020
9937090
Update Nextcloud to 20.0.3, 19.0.6 and 18.0.12
hoellen Dec 9, 2020
39e5c9c
Update Nextcloud to 20.0.4
hoellen Dec 16, 2020
3a26ffb
Use proxy forwarded headers if available for /.well-known redirects
hoellen Jan 3, 2021
b601208
Check for UID/GID and add nextcloud user
hoellen Jan 3, 2021
ed47c8a
Use PHP 7.4 again for Nextcloud 20
hoellen Jan 3, 2021
ff350c8
Revert .well-known redirects
hoellen Jan 3, 2021
c0ae524
Update PHP to 7.4.14 and 7.3.26
hoellen Jan 7, 2021
933259a
Update Nextcloud to 20.0.5, 19.0.7 and 18.0.13
hoellen Jan 14, 2021
4568332
Update Alpine base image to 3.13
hoellen Jan 16, 2021
564b517
Update searx and alpine base image
hoellen Jan 18, 2021
3cc1ca6
Fix searx master build
hoellen Jan 18, 2021
852f8ab
Update Nextcloud to 20.0.6, 19.0.8 and 18.0.14
hoellen Jan 26, 2021
10d5df0
Update Nextcloud to 20.0.7
hoellen Feb 3, 2021
6237e0f
Update PHP to 7.4.15 and 7.3.27
hoellen Feb 4, 2021
f93d2f8
Add Nextcloud 21 RC2
hoellen Feb 11, 2021
e84793b
Update nginx config for Nextcloud
hoellen Feb 11, 2021
ad93bae
Update to Nextcloud 21 and remove 18 (end-of-life)
hoellen Feb 22, 2021
27de5b3
Enable APCu data cache on cli
hoellen Feb 23, 2021
1cff5f6
Update Nextcloud to 20.0.8 and 19.0.9 (#48)
waja Feb 25, 2021
4ddcebb
Update PHP to 7.4.16 and 7.3.28
hoellen Mar 4, 2021
3b382ab
Update searx to 1.0.0
hoellen Mar 28, 2021
dc3c701
Update PrivateBin to 1.3.5
hoellen Apr 5, 2021
47969b1
Update Nextcloud to 21.0.1, 20.0.9 and 19.0.10
hoellen Apr 9, 2021
f2141a1
Update nginx to 1.20.0
hoellen Apr 20, 2021
ca8ae7b
Update Nextcloud to 21.0.2, 20.0.10 and 19.0.11
hoellen May 7, 2021
1d35e88
Update NGINX to 1.20.1
hoellen May 25, 2021
6b51fc5
Update PHP to 7.4.20
hoellen Jun 3, 2021
7d67efe
Update Nextcloud 19.0 to 19.0.12
hoellen Jun 15, 2021
e67594a
Update Nextcloud to 21.0.3, 20.0.11 and 19.0.13
hoellen Jul 1, 2021
ab15e38
Update PHP to 7.3.29
hoellen Jul 1, 2021
fd6a64c
Update PHP to 7.4.21
hoellen Jul 1, 2021
36ff6a1
Add Nextcloud 22.0
hoellen Jul 6, 2021
9a364c5
Adjusting doc for Nextcloud 22 (#53)
waja Jul 6, 2021
7a9b05d
nextcloud:latest is now v22.0
hoellen Jul 9, 2021
26ae6dc
Update PHP to 7.4.22
hoellen Jul 29, 2021
98b607b
Remove Nextcloud 19.0
hoellen Aug 3, 2021
f3893b9
Update Nextcloud to 22.1.0, 21.0.4 and 20.0.12
hoellen Aug 3, 2021
dcda13e
Update nextcloud to 22.1.1
eloo Aug 31, 2021
c6f1edc
Rename Version (Nextcloud 22.0 -> 22.1)
hoellen Aug 5, 2021
b7b5e54
Update README
hoellen Sep 17, 2021
6e2ebaa
Update Nextcloud to 22.2.0, 21.0.5 and 20.0.13
waja Sep 30, 2021
852d65d
Update Nextcloud to 22.2.2, 21.0.6 and 20.0.14
hoellen Nov 13, 2021
328ac76
Update PHP to 7.4.25 and 7.3.32
hoellen Nov 13, 2021
557785c
Updateing Nextcloud to 22.2.3 and 21.0.7
waja Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# dockerfiles
Discontinued. Fork at your will.
Based on [Wonderfall Dockerfiles](https://github.com/Wonderfall/dockerfiles)

There are **automated builds** on [Docker](https://hub.docker.com/u/hoellen).
44 changes: 6 additions & 38 deletions boring-nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:3.6
FROM alpine:3.13

ENV UID=991 GID=991

ARG NGINX_VERSION=1.13.5
ARG NGINX_VERSION=1.20.1
ARG GPG_NGINX="B0F4 2533 73F8 F6F5 10D4 2178 520A 9993 A1C0 52F8"
ARG BUILD_CORES

Expand All @@ -29,32 +29,24 @@ ARG NGINX_3RD_PARTY_MODULES=" \
--add-module=/tmp/ngx_brotli"

RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \

# Update system
&& apk -U upgrade \

# Installing runtime dependencies
&& apk add \
${BUILD_DEPS} \
pcre \
zlib \
libgcc \
libstdc++ \
jemalloc \
su-exec \
libressl \
bind-tools \
tini \

# Installing build dependencies
&& apk add -t build-dependencies \
build-base \
linux-headers \
ca-certificates \
automake \
autoconf \
git \
jemalloc-dev \
tar \
libtool \
pcre-dev \
Expand All @@ -63,31 +55,17 @@ RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \
gnupg \
cmake \
go \

# Brotli
&& cd /tmp && git clone https://github.com/bagder/libbrotli --depth=1 \
&& cd libbrotli && ./autogen.sh && ./configure && make -j ${NB_CORES} && make install \
&& cd /tmp && git clone https://github.com/google/ngx_brotli --depth=1 \
&& cd ngx_brotli && git submodule update --init \

# Headers More
&& cd /tmp && git clone https://github.com/openresty/headers-more-nginx-module --depth=1 \

# BoringSSL
&& git clone https://boringssl.googlesource.com/boringssl --depth=1 \
&& cd boringssl \
&& sed -i 's@out \([>=]\) TLS1_2_VERSION@out \1 TLS1_3_VERSION@' ssl/ssl_lib.cc \
&& sed -i 's@ssl->version[ ]*=[ ]*TLS1_2_VERSION@ssl->version = TLS1_3_VERSION@' ssl/s3_lib.cc \
&& sed -i 's@(SSL3_VERSION, TLS1_2_VERSION@(SSL3_VERSION, TLS1_3_VERSION@' ssl/ssl_test.cc \
&& sed -i 's@\$shaext[ ]*=[ ]*0;@\$shaext = 1;@' crypto/*/asm/*.pl \
&& sed -i 's@\$avx[ ]*=[ ]*[0|1];@\$avx = 2;@' crypto/*/asm/*.pl \
&& sed -i 's@\$addx[ ]*=[ ]*0;@\$addx = 1;@' crypto/*/asm/*.pl \
&& mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. \
&& make -j ${NB_CORES} && cd .. \
&& mkdir -p .openssl/lib/ && cd .openssl && ln -s ../include && cd .. \
&& cp build/crypto/libcrypto.a build/ssl/libssl.a .openssl/lib && cd /tmp \

# Nginx tarball checking
&& NGINX_TARBALL="nginx-${NGINX_VERSION}.tar.gz" \
&& wget -q https://nginx.org/download/${NGINX_TARBALL} \
&& echo "Verifying ${NGINX_TARBALL} using GPG..." \
Expand All @@ -100,31 +78,21 @@ RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \
&& if [ "${FINGERPRINT}" != "${GPG_NGINX}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \
&& echo "All seems good, now unpacking ${NGINX_TARBALL}..." \
&& tar xzf ${NGINX_TARBALL} && cd nginx-${NGINX_VERSION} \

# Nginx patch : dynamic TLS records
&& wget -q https://raw.githubusercontent.com/cujanovic/nginx-dynamic-tls-records-patch/master/nginx__dynamic_tls_records_1.13.0%2B.patch -O dynamic_records.patch \
&& wget -q https://raw.githubusercontent.com/hoellen/dockerfiles/master/boring-nginx/dynamic_records.patch -O dynamic_records.patch \
&& patch -p1 < dynamic_records.patch \

# Nginx full HPACK encoding support
# && wget -q https://raw.githubusercontent.com/cloudflare/sslconfig/master/patches/nginx_1.13.1_http2_hpack.patch \
# && patch -p1 < nginx_1.13.1_http2_hpack.patch \

# Nginx compilation
&& ./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--with-cc-opt="-O3 -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -Wno-deprecated-declarations -I ../boringssl/.openssl/include/" \
--with-ld-opt="-lrt -ljemalloc -Wl,-Bsymbolic-functions -Wl,-z,relro -L ../boringssl/.openssl/lib" \
--with-ld-opt="-lrt -Wl,-Bsymbolic-functions -Wl,-z,relro -L ../boringssl/.openssl/lib" \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log \
${NGINX_MODULES} \
${NGINX_3RD_PARTY_MODULES} \
&& make -j ${NB_CORES} && make install && make clean \
&& strip -s /usr/sbin/nginx \

# Clean
&& apk del build-dependencies \
&& rm -rf /tmp/* /var/cache/apk/* /root/.gnupg
&& rm -rf /tmp/* /var/cache/apk/*

COPY rootfs /

Expand All @@ -137,6 +105,6 @@ VOLUME /sites-enabled /www /conf.d /passwds /certs /var/log/nginx
LABEL description="nginx built from source" \
openssl="BoringSSL" \
nginx="nginx ${NGINX_VERSION}" \
maintainer="Wonderfall <[email protected]>"
maintainer="hoellen <[email protected]>"

CMD ["run.sh"]
5 changes: 3 additions & 2 deletions boring-nginx/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
## wonderfall/boring-nginx
## hoellen/boring-nginx

![](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/115px-Nginx_logo.svg.png)

#### What is this?
This is nginx statically linked against BoringSSL, with embedded Brotli support.

#### Features
- Thanks to [Wonderfall](https://github.com/wonderfall/dockerfiles)
- Based on Alpine Linux.
- nginx built against **BoringSSL** with SSE/SHA, and AVX2 SIMD-instructions.
- **TLS 1.3** patch : use of TLS 1.3 DRAFT is enforced (haven't found another way yet).
- **TLS 1.3** enabled
- Built using hardening gcc flags.
- Dynamic TLS records patch (cloudflare).
- TTP/2 (+NPN) support.
Expand Down
252 changes: 252 additions & 0 deletions boring-nginx/dynamic_records.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
What we do now:
We use a static record size of 4K. This gives a good balance of latency and
throughput.

Optimize latency:
By initialy sending small (1 TCP segment) sized records, we are able to avoid
HoL blocking of the first byte. This means TTFB is sometime lower by a whole
RTT.

Optimizing throughput:
By sending increasingly larger records later in the connection, when HoL is not
a problem, we reduce the overhead of TLS record (29 bytes per record with
GCM/CHACHA-POLY).

Logic:
Start each connection with small records (1369 byte default, change with
ssl_dyn_rec_size_lo). After a given number of records (40, change with
ssl_dyn_rec_threshold) start sending larger records (4229, ssl_dyn_rec_size_hi).
Eventually after the same number of records, start sending the largest records
(ssl_buffer_size).
In case the connection idles for a given amount of time (1s,
ssl_dyn_rec_timeout), the process repeats itself (i.e. begin sending small
records again).

Upstream source:
https://github.com/cloudflare/sslconfig/blob/master/patches/nginx__dynamic_tls_records.patch

--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1272,6 +1272,7 @@

sc->buffer = ((flags & NGX_SSL_BUFFER) != 0);
sc->buffer_size = ssl->buffer_size;
+ sc->dyn_rec = ssl->dyn_rec;

sc->session_ctx = ssl->ctx;

@@ -2124,6 +2125,41 @@

for ( ;; ) {

+ /* Dynamic record resizing:
+ We want the initial records to fit into one TCP segment
+ so we don't get TCP HoL blocking due to TCP Slow Start.
+ A connection always starts with small records, but after
+ a given amount of records sent, we make the records larger
+ to reduce header overhead.
+ After a connection has idled for a given timeout, begin
+ the process from the start. The actual parameters are
+ configurable. If dyn_rec_timeout is 0, we assume dyn_rec is off. */
+
+ if (c->ssl->dyn_rec.timeout > 0 ) {
+
+ if (ngx_current_msec - c->ssl->dyn_rec_last_write >
+ c->ssl->dyn_rec.timeout)
+ {
+ buf->end = buf->start + c->ssl->dyn_rec.size_lo;
+ c->ssl->dyn_rec_records_sent = 0;
+
+ } else {
+ if (c->ssl->dyn_rec_records_sent >
+ c->ssl->dyn_rec.threshold * 2)
+ {
+ buf->end = buf->start + c->ssl->buffer_size;
+
+ } else if (c->ssl->dyn_rec_records_sent >
+ c->ssl->dyn_rec.threshold)
+ {
+ buf->end = buf->start + c->ssl->dyn_rec.size_hi;
+
+ } else {
+ buf->end = buf->start + c->ssl->dyn_rec.size_lo;
+ }
+ }
+ }
+
while (in && buf->last < buf->end && send < limit) {
if (in->buf->last_buf || in->buf->flush) {
flush = 1;
@@ -2231,6 +2272,9 @@

if (n > 0) {

+ c->ssl->dyn_rec_records_sent++;
+ c->ssl->dyn_rec_last_write = ngx_current_msec;
+
if (c->ssl->saved_read_handler) {

c->read->handler = c->ssl->saved_read_handler;
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -64,10 +64,19 @@
#endif


+typedef struct {
+ ngx_msec_t timeout;
+ ngx_uint_t threshold;
+ size_t size_lo;
+ size_t size_hi;
+} ngx_ssl_dyn_rec_t;
+
+
struct ngx_ssl_s {
SSL_CTX *ctx;
ngx_log_t *log;
size_t buffer_size;
+ ngx_ssl_dyn_rec_t dyn_rec;
};


@@ -99,6 +108,10 @@
unsigned in_early:1;
unsigned early_preread:1;
unsigned write_blocked:1;
+
+ ngx_ssl_dyn_rec_t dyn_rec;
+ ngx_msec_t dyn_rec_last_write;
+ ngx_uint_t dyn_rec_records_sent;
};


@@ -108,7 +121,7 @@
#define NGX_SSL_DFLT_BUILTIN_SCACHE -5


-#define NGX_SSL_MAX_SESSION_SIZE 4096
+#define NGX_SSL_MAX_SESSION_SIZE 16384

typedef struct ngx_ssl_sess_id_s ngx_ssl_sess_id_t;

--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -246,6 +246,41 @@
offsetof(ngx_http_ssl_srv_conf_t, early_data),
NULL },

+ { ngx_string("ssl_dyn_rec_enable"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_ssl_srv_conf_t, dyn_rec_enable),
+ NULL },
+
+ { ngx_string("ssl_dyn_rec_timeout"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_msec_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_ssl_srv_conf_t, dyn_rec_timeout),
+ NULL },
+
+ { ngx_string("ssl_dyn_rec_size_lo"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_size_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_ssl_srv_conf_t, dyn_rec_size_lo),
+ NULL },
+
+ { ngx_string("ssl_dyn_rec_size_hi"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_size_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_ssl_srv_conf_t, dyn_rec_size_hi),
+ NULL },
+
+ { ngx_string("ssl_dyn_rec_threshold"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_num_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_ssl_srv_conf_t, dyn_rec_threshold),
+ NULL },
+
ngx_null_command
};

@@ -576,6 +611,11 @@
sscf->session_ticket_keys = NGX_CONF_UNSET_PTR;
sscf->stapling = NGX_CONF_UNSET;
sscf->stapling_verify = NGX_CONF_UNSET;
+ sscf->dyn_rec_enable = NGX_CONF_UNSET;
+ sscf->dyn_rec_timeout = NGX_CONF_UNSET_MSEC;
+ sscf->dyn_rec_size_lo = NGX_CONF_UNSET_SIZE;
+ sscf->dyn_rec_size_hi = NGX_CONF_UNSET_SIZE;
+ sscf->dyn_rec_threshold = NGX_CONF_UNSET_UINT;

return sscf;
}
@@ -643,6 +683,20 @@
ngx_conf_merge_str_value(conf->stapling_responder,
prev->stapling_responder, "");

+ ngx_conf_merge_value(conf->dyn_rec_enable, prev->dyn_rec_enable, 0);
+ ngx_conf_merge_msec_value(conf->dyn_rec_timeout, prev->dyn_rec_timeout,
+ 1000);
+ /* Default sizes for the dynamic record sizes are defined to fit maximal
+ TLS + IPv6 overhead in a single TCP segment for lo and 3 segments for hi:
+ 1369 = 1500 - 40 (IP) - 20 (TCP) - 10 (Time) - 61 (Max TLS overhead) */
+ ngx_conf_merge_size_value(conf->dyn_rec_size_lo, prev->dyn_rec_size_lo,
+ 1369);
+ /* 4229 = (1500 - 40 - 20 - 10) * 3 - 61 */
+ ngx_conf_merge_size_value(conf->dyn_rec_size_hi, prev->dyn_rec_size_hi,
+ 4229);
+ ngx_conf_merge_uint_value(conf->dyn_rec_threshold, prev->dyn_rec_threshold,
+ 40);
+
conf->ssl.log = cf->log;

if (conf->enable) {
@@ -827,6 +881,28 @@
return NGX_CONF_ERROR;
}

+ if (conf->dyn_rec_enable) {
+ conf->ssl.dyn_rec.timeout = conf->dyn_rec_timeout;
+ conf->ssl.dyn_rec.threshold = conf->dyn_rec_threshold;
+
+ if (conf->buffer_size > conf->dyn_rec_size_lo) {
+ conf->ssl.dyn_rec.size_lo = conf->dyn_rec_size_lo;
+
+ } else {
+ conf->ssl.dyn_rec.size_lo = conf->buffer_size;
+ }
+
+ if (conf->buffer_size > conf->dyn_rec_size_hi) {
+ conf->ssl.dyn_rec.size_hi = conf->dyn_rec_size_hi;
+
+ } else {
+ conf->ssl.dyn_rec.size_hi = conf->buffer_size;
+ }
+
+ } else {
+ conf->ssl.dyn_rec.timeout = 0;
+ }
+
return NGX_CONF_OK;
}

--- a/src/http/modules/ngx_http_ssl_module.h
+++ b/src/http/modules/ngx_http_ssl_module.h
@@ -58,6 +58,12 @@

u_char *file;
ngx_uint_t line;
+
+ ngx_flag_t dyn_rec_enable;
+ ngx_msec_t dyn_rec_timeout;
+ size_t dyn_rec_size_lo;
+ size_t dyn_rec_size_hi;
+ ngx_uint_t dyn_rec_threshold;
} ngx_http_ssl_srv_conf_t;


Loading