Commit graph

147 commits

Author SHA1 Message Date
Nicolas Duchon
83e3b25c46
Merge pull request #1797 from polarathene/feat/prefer-rfc-7919-dhparams
feat: Use RFC 7919 DH groups + Remove DH generation
2021-10-21 08:35:39 +02:00
polarathene
391ca3e3b5 fix(Dockerfile): Remove VOLUME in Dockerfile
Anonymous volumes are discouraged for reliable persistence.

Users should use named volumes or bind mounts instead. Potentially breaking change, users can also use explicit anonymous volumes instead of relying on implicit anonymous volumes.

`nginx-proxy` really should not be creating implicit anonymous volumes as in most cases it is undesirable.

`git blame` reveals this was added in 2014  by jwilder, with a message that implies implicit anonymous volumes was never intended..
2021-09-28 21:59:53 +13:00
polarathene
ac066a73e4 feat: Replace generated DH params with RFC 7919 standardized DHE groups
- While the anonymous VOLUME can be dropped from Dockerfile, the path needs to be valid at run-time, might as well ensure it's available by creating the dhparam folder at build.

- Generation logic no longer necessary, dropped. 

- Standardized RFC 7919 groups added (2048, 3072, 4096), with 4096-bit remaining the default size. The DH logic can live in the entrypoint script as well. 

- Third-party supplied pre-generated DH params removed as they're not considered trustworthy compared to RFC 7919 groups.
2021-09-28 21:30:02 +13:00
dependabot[bot]
583c71ec3d
chore(deps): bump nginx from 1.21.1 to 1.21.3
Bumps nginx from 1.21.1 to 1.21.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-10 04:12:34 +00:00
dependabot[bot]
c36633320e
chore(deps): bump golang from 1.16.6 to 1.16.7
Bumps golang from 1.16.6 to 1.16.7.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-06 04:11:55 +00:00
Nicolas Duchon
8526d918ed
style: Dockerfiles linting 2021-08-04 08:49:23 +02:00
Nicolas Duchon
897e4135d3
build: docker-gen 0.7.6 -> 0.7.7 2021-08-04 08:48:25 +02:00
dependabot[bot]
0b735897cb
chore(deps): bump golang from 1.16.5 to 1.16.6
Bumps golang from 1.16.5 to 1.16.6.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-15 04:11:52 +00:00
dependabot[bot]
d743160597
chore(deps): bump nginx from 1.21.0 to 1.21.1
Bumps nginx from 1.21.0 to 1.21.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-09 04:11:58 +00:00
Nicolas Duchon
987c996173
Merge pull request #1641 from nginx-proxy/dependabot/docker/nginx-1.21.0
chore(deps): bump nginx from 1.19.10 to 1.21.0
2021-06-14 13:47:26 +02:00
dependabot[bot]
1967ca2a57
chore(deps): bump golang from 1.15.10 to 1.16.5
Bumps golang from 1.15.10 to 1.16.5.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-08 23:28:24 +00:00
dependabot[bot]
ae5623916b
chore(deps): bump nginx from 1.19.10 to 1.21.0
Bumps nginx from 1.19.10 to 1.21.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-08 23:28:15 +00:00
Nicolas Duchon
7f2307626d
Merge pull request #1603 from nginx-proxy/forego
Chore: switch to go mod compatible fork of forego
2021-06-09 01:27:31 +02:00
Nicolas Duchon
242caf9e69
chore: switch to go mod compatible fork of forego 2021-06-09 01:18:02 +02:00
Nicolas Duchon
35df872705
Merge pull request #973 from Sparted/master
Upd: Boost worker_connections from 1024 to 10240.
2021-04-28 21:39:57 +02:00
dependabot[bot]
5e4f005240
Bump nginx from 1.19.3 to 1.19.10
Bumps nginx from 1.19.3 to 1.19.10.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 22:44:46 +00:00
Nicolas Duchon
f8aa9a1637
chore: bump docker-gen from 0.7.4 to 0.7.6 2021-04-26 14:55:33 +02:00
Tom Wiesing
83ca0511d1
Hardcode nginx 1.19.3 for use in Docker Images
This commit updates both 'Dockerfile' and 'Dockerfile.alpine' to use
'nginx 1.19.3'. This change was implemented after feedback from @buchdag
to be able to use dependabot.
2021-04-01 15:54:26 +02:00
Tom Wiesing
6b8cd894da
Hardcode go 1.15.10 for use in Docker Images
This commit updates both 'Dockerfile' and 'Dockerfile.alpine' to use
'go.15.10' when building the dependencies. This change was implemented
after feedback from @buchdag to be able to use dependabot.
2021-04-01 13:54:37 +02:00
Tom Wiesing
886dd04b62
Enable multi-architecture docker image builds
Previously, the Dockerfile downloaded 'docker-gen' and 'forego' binaries
during build time. This caused a problem as it hard-coded the amd64
architecture for the images.

This commit updates both 'Dockerfile' and 'Dockerfile.alpine' to build
the `forego` and `docker-gen` executables from scratch instead of
downloading binaries directly.

This is achieved using multi-stage builds [1]. Two seperate stages first
build the binaries, and are then copied over to the final stage.

The advantage of this change is two-fold: First, it enables building
this image on architectures other than amd64. Secondly it adds trust by
not adding external binaries to the docker image.

This modified version passes the test both a linux desktop (amd64) as
well as a raspberry pi (armv7) with some caveats:

- On armv7, a modified version of the `jwilder/docker-gen` image is
required. See a seperate PR at [2].

- The 'test_dhparam_is_generated_if_missing' test fails. This also
doesn't currently pass on master.

[1] https://docs.docker.com/develop/develop-images/multistage-build/ [2]
https://github.com/jwilder/docker-gen/pull/327
2021-03-21 12:31:06 +01:00
lemker
ea28f2f32f Upgrade Nginx to 1.19.3 2020-10-08 19:05:47 -07:00
sgabe
6798a6b800 Upgrade to 1.17.8 2020-02-28 16:36:36 +01:00
Jake Jarvis
77227f8691
Upgrade nginx to 1.17.6 2019-12-04 10:19:17 -05:00
Matthias Döring
cf911d950a Upgrade to 1.17.5
closes #1337, resolves #1355
2019-11-08 14:11:17 +01:00
Lorenzo Cameroni
a4cc268628 Use nginx 1.17.3 2019-08-18 11:20:05 +02:00
Jiazhen Xie
16169a0f74 Use nginx latest version 2019-08-07 17:32:52 +01:00
Gpkfr
58c1fe3606
Upgrade to nginx 1.14.1 stable version 2018-11-09 15:26:01 +01:00
Matthias Döring
cb2b0e2bd3 Upgrade to nginx 1.14 stable 2018-06-06 00:56:47 +02:00
C-A de Salaberry
4932ef3036 Upd: Boost worker_connections from 1024 to 10240. 2018-02-07 15:30:26 +01:00
Jason Wilder
32d42ffee7 Update docker-gen to 0.7.4 2018-01-14 15:28:46 -07:00
cglewis
55610b8425 MAINTAINER is deprecated, using LABEL now 2017-10-31 18:21:12 -07:00
Steve Kamerman
93d90884e2
Implemented NETWORK_ACCESS (squash commit) 2017-10-18 13:29:12 -04:00
Matthias Döring
febf85d7e2 Move to 1.13 base image to get auto updates
Less maintenance and more security
Resolves #880
2017-07-21 13:45:33 +02:00
Steve Kamerman
761bbf9dbc Removed duplicate server_names_hash_bucket_size directive 2017-06-18 21:21:05 -04:00
Jason Wilder
c41186a3a4 Merge branch 'master' into feature_ssl_improvement 2017-06-14 16:31:12 -06:00
neil
1867228cce fix worker_processes to "auto" 2017-06-12 15:59:55 +08:00
Tobias Hüske
2c4102d396 Upgrade to 1.13.0 2017-05-04 18:57:00 +02:00
Matthias Döring
172d79aff4 Upgrade to nginx 1.11.13 2017-04-07 12:58:49 +02:00
Steve Kamerman
ad9af2884d Merged master, fixed BATS conflict 2017-03-06 10:48:12 -05:00
Matthias Döring
7bafa37a52 Upgrade to nginx 1.11.10 2017-02-21 14:03:54 +01:00
Matthias Döring
15cbb5debf Upgrade to nginx 1.11.9 2017-02-05 21:40:29 +01:00
Steve Kamerman
dfdd67f5a4 Implemented background dhparam generation 2017-01-11 22:43:09 -05:00
Steve Kamerman
f186815c2d Merged upstream 2017-01-11 22:42:35 -05:00
Matthias Döring
004cc3cb8c Upgrade to nginx 1.11.8 2016-12-28 23:38:47 +01:00
Cody Ramaker
b66398d1bf Updated nginx to 1.11.6 2016-12-08 13:24:49 -06:00
Steve Kamerman
b0de80d46b Moved config edits from Dockerfile to template 2016-10-03 10:21:31 -04:00
Steve Kamerman
8534185b0c Added newline to config 2016-10-03 10:05:55 -04:00
Steve Kamerman
0b1e9e56e1 Issue #535 Added default 2048-bit dhparam.pem file 2016-09-29 16:48:18 -04:00
hwang
03e863d838 upgrade nginx to 1.11.3 2016-08-25 20:16:37 +02:00
hwang
86c408bbdd upgrade nginx to 1.11.0 2016-07-29 21:17:14 +02:00
Jason Wilder
8ed5ab38b8 Update to docker-gen 0.7.3 2016-06-13 00:24:21 -06:00
Jason Wilder
c256f31728 Update nginx 1.9.15 2016-06-10 20:08:10 -06:00
Jason Wilder
d40d1d4052 Update to docker-gen 0.7.1 2016-05-04 14:51:30 -06:00
Jason Wilder
a54af7d73b Switch forego downloads
Official ddollar site has been down for a while and not sure if it's
coming back up or not.
2016-04-04 16:48:52 -06:00
Pit Kleyersburg
86aea653c8 Update to docker-gen 0.7.0
Since [1] some timings seem to have changed. This caused the unit tests
to fail intermittently, from my testings especially on Ubuntu systems
(much less often on e.g. Arch).

This commit adds the `dockergen_wait_for_event` helper-function to try
and wait for the configuration to be generated by docker-gen before
continuing on with the actual tests themselves.

Additionally, at the end of every test file, all containers spun up by
the bats-tests will be stopped. This required adding the `bats-type`
label to every container started during the bats-tests.

The stopping of the containers reduces the amount of events docker-gen
has to process, thus resulting in lower wait times for the generation to
happen.

[1]: 50435652b1
2016-03-23 17:45:34 +01:00
Mike Rohland
1f8b480365 moved nginx to 1.9.12 2016-03-21 22:47:01 +01:00
Tobias Munk
627f789f19 updated nginx to 1.9.9 2016-01-20 23:26:21 +01:00
Jason Wilder
588cdf6266 Update email address 2015-10-29 13:32:09 -06:00
Mike Dillon
5404938797 Update to nginx 1.9.6 2015-10-28 21:29:39 -07:00
Marius Gundersen
3e530a0784 Use latest docker-gen 2015-10-13 21:49:19 +02:00
Aleš Roubíček
d45c10ca66 Use nginx 1.9.5 2015-09-23 17:43:31 +02:00
Jason Wilder
83b0b25c26 Merge pull request #228 from berfarah/patch-1
Bumping to latest Docker Gen version
2015-09-12 15:00:00 -06:00
Mike Dillon
f95ff82ad0 Adjust entrypoint to always warn on missing socket
Also chmod the entrypoint
2015-09-12 07:23:36 -07:00
Thomas LEVEIL
1aac996019 conform to Docker official images best practices
https://github.com/docker-library/official-images/blob/master/README.md#consistency
2015-09-12 10:37:21 +00:00
Thomas LEVEIL
d83ba3da1e refuse to start if the docker sock isn't available 2015-09-11 23:42:44 +00:00
Bernardo Farah
d844c124ff Bumping to latest Docker Gen version
As per [this](https://github.com/jwilder/docker-gen/issues/114) ticket. Thanks again!
2015-09-01 09:38:43 -07:00
Mike Dillon
f36ca3d7a3 Prevent generating broken config
Fixes #115
2015-06-23 17:05:12 -07:00
Joseph Page
89fe2a3898 Update to nginx 1.9.2 2015-06-20 22:25:52 +02:00
Jason Wilder
503072c03f Merge pull request #72 from BenHall/default_host
Ability to set a default host for nginx
2015-05-14 10:00:04 -06:00
Mike Dillon
7eb785cec5 Update base image to nginx:1.9.0 2015-05-01 14:01:30 -07:00
Mike Dillon
ead1912590 Update to Nginx 1.7.11 2015-03-27 10:11:54 -07:00
Jason Wilder
95df1d225e Update to docker-gen 0.3.9 2015-03-13 17:25:53 -06:00
Bernardo Farah
1f426a6e61 Updated docker-gen version to 0.3.8 2015-03-13 14:53:40 -07:00
Mike Dillon
8d885aac1a Update to nginx:1.7.10 2015-03-10 21:15:42 -07:00
Julien Pervillé
d7e499e4e6 Allow for even longer virtual host names (should work to at least 50 chars). 2015-01-02 10:49:21 +06:30
Ben Hall
30a53fb60a Ability to set a default host for nginx 2014-12-24 12:21:40 +00:00
Jason Wilder
654e037741 Merge pull request #65 from josephpage/patch-1
Bump to nginx 1.7.8
2014-12-13 16:59:29 -07:00
Max Claus Nunes
10bc94f6db fixes problem to set server name max length…
current base image does not have commented configurations which means is impossible to use the previous configuration to set the server name max length
2014-12-13 10:00:45 -02:00
Joseph Page
a668579392 Bump to nginx 1.7.8 2014-12-10 11:37:44 +01:00
Jason Wilder
db924dba76 Use nginx:1.7.7 2014-12-03 11:12:01 -07:00
Sebastiaan van Stijn
3c5843264e Switch to official nginx base-image.
This changes the base-image to the official nginx image,
reducing the virtual size of the image by approx 50%.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2014-12-03 10:20:58 +01:00
Jason Wilder
2e43a5459b Add SSL support
This adds SSL support for containers.  It supports single host
certificates, wildcards and SNI using naming conventions for
certificates or optionally specify a cert name (for SNI).  The SSL
cipher configuration is based on mozilla intermediate profile which
should provide compatibility with clients back to Firefox 1, Chrome 1,
IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7.  The
configuration also enables OCSP stapling, HSTS, and ssl session caches.

To enable SSL, nginx-proxy should be started w/ -p 443:443 and -v
/path/to/certs:/etc/nginx/certs.  Certificates must be named:
<virtualhost>.crt and <virtualhost>.key where <virtualhost> matches
the a value of VIRTUAL_HOST on a container.

For wildcard certificates, the certificate and private key should be
named after the wildcard domain with .crt and .key suffixes.  For example,
*.example.com should be name example.com.crt and example.com.key.

For SNI where a certificate may be used for multiple domain names, the
container can specify a CERT_NAME env var that corresponds to the base
file name of the certificate and key.  For example, if you have a cert
allowing *.example.com and *.bar.com, it can be name shared.crt and
shared.key.  A container can use that cert by having CERT_NAME=shared and
VIRTUAL_HOST=foo.example.com.  The name "shared" is arbitrary and can
be whatever makes sense.

The behavior for the proxy when port 80 and 443 is defined is as
follows:

* If a container has a usable cert, port 80 will redirect to
443 for that container to always prefer HTTPS when available.
* If the container does not have a usable cert 503 will be returned.

In the last case, a self-signed or generic cert can be defined as
"default.crt" and "default.key" which will allow a client browser to
at least make a SSL connection.
2014-11-27 12:49:38 -07:00
Jason Wilder
7c4d0d22ac upgrade to docker-gen 0.3.6 2014-11-26 15:48:17 -07:00
Sebastiaan van Stijn
d68be71a3f Optimize Dockerfile.
This optimizes the Dockerfile by;

- Combining RUN statements so that files are removed in the
  same layer as they are added.
- Removing the downloaded .tar.gz of the docker-gen binary
  after expanding
- Adding `--no-install-recommends` (but explicitly installing
  ca-certificates)
- Replacing `ADD` with `COPY` (recommended if no unpacking is
  required)

Also added a `.dockerignore` file to prevent the `.git` directory
and README.md being added to the image.

These changes reduce the size of the image with 34 MB (was 268.4 MB,
now 233.9 MB), and results in less layers being produced.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2014-11-26 11:00:01 +01:00
Mike Dillon
ddfd8ef8f4 Update to docker-gen 0.3.4 2014-10-22 16:32:50 -07:00
Brian Christner
1404ecacf9 Upgrade Bash
Updated Dockerfile in order to update/upgrade bash to fix the security bug found by Red Hat https://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/
2014-09-25 12:59:36 +02:00
Brian Christner
d8f579b1e2 Update Dockerfile 2014-09-25 12:53:13 +02:00
Jason Wilder
158508413a Upgrade to docker-gen 0.3.3 2014-09-19 14:57:36 -06:00
Andrew Vos
61bb0a62fb Only add source after dependency download
This lets docker cache the ADD instruction, giving us a faster build.
Also, install docker-gen directly to /usr/local/bin.
2014-09-17 20:23:27 +01:00
Jason Wilder
711a7b3852 Upgrade to docker-gen 0.3.2
* Adds exists template tag
* Fixes generating files to volumes
* Fixes inconsistency w/ -watch/-endpoint
2014-07-11 12:24:24 -06:00
Jason Wilder
6f7ac47a42 Use Ubuntu Trusty 14.04 as base image 2014-07-11 09:59:45 -06:00
Jason Wilder
b9d7bde5cd Support multiple VIRTUAL_HOSTs per container.
Fixes #3
2014-06-08 10:14:51 -06:00
Jason Wilder
ebce30e761 Use ddollar/forego v0.9.0 2014-06-08 10:10:59 -06:00
Paim pozhil
d3f4efaa83 Fix for long server names 2014-06-08 01:23:16 +05:30
Jason Wilder
4f3d690cd3 Stream logs to stdout/err
Nginx and docker-gen logs can now be seen via docker logs.
2014-06-03 16:30:05 -06:00
Jason Wilder
592ed499d7 Improve port configuration
Should address #6.

The port selection now works as follows:

* If there is only 1 port exposed by the container, that port is used.
* If there is a VIRTUAL_PORT env variable defined, that port is used.
* Otherwise, default to port 80, if exposed.
2014-05-19 21:10:53 -06:00
Jason Wilder
3d25e3da57 Initial commit 2014-05-05 11:02:01 -06:00