Skip to content

Commit fbd8b3e

Browse files
authored
Merge pull request #77 from nginx-proxy/main
update
2 parents 3d61f47 + d7acd93 commit fbd8b3e

File tree

99 files changed

+2434
-730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+2434
-730
lines changed

.github/workflows/build-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181

8282
- name: Build and push the image
8383
id: docker_build
84-
uses: docker/build-push-action@v5
84+
uses: docker/build-push-action@v6
8585
with:
8686
context: .
8787
file: Dockerfile.${{ matrix.base }}

Dockerfile.alpine

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM nginxproxy/docker-gen:0.11.1 AS docker-gen
1+
FROM docker.io/nginxproxy/docker-gen:0.14.3 AS docker-gen
22

3-
FROM nginxproxy/forego:0.18.1 AS forego
3+
FROM docker.io/nginxproxy/forego:0.18.2 AS forego
44

55
# Build the final image
6-
FROM nginx:1.25.3-alpine
6+
FROM docker.io/library/nginx:1.27.2-alpine
77

88
ARG NGINX_PROXY_VERSION
99
# Add DOCKER_GEN_VERSION environment variable because
@@ -17,8 +17,13 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
1717
RUN apk add --no-cache --virtual .run-deps bash openssl
1818

1919
# Configure Nginx
20-
RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
21-
&& mkdir -p '/etc/nginx/dhparam'
20+
RUN echo -e "\ninclude /etc/nginx/toplevel.conf.d/*.conf;" >> /etc/nginx/nginx.conf \
21+
&& sed -i 's/worker_connections.*;$/worker_connections 10240;/' /etc/nginx/nginx.conf \
22+
&& sed -i -e '/^\}$/{s//\}\nworker_rlimit_nofile 20480;/;:a' -e '$!N;$!ba' -e '}' /etc/nginx/nginx.conf \
23+
&& mkdir -p '/etc/nginx/toplevel.conf.d' \
24+
&& mkdir -p '/etc/nginx/dhparam' \
25+
&& mkdir -p '/etc/nginx/certs' \
26+
&& mkdir -p '/usr/share/nginx/html/errors'
2227

2328
# Install Forego + docker-gen
2429
COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego

Dockerfile.debian

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM nginxproxy/docker-gen:0.11.1-debian AS docker-gen
1+
FROM docker.io/nginxproxy/docker-gen:0.14.3-debian AS docker-gen
22

3-
FROM nginxproxy/forego:0.18.1-debian AS forego
3+
FROM docker.io/nginxproxy/forego:0.18.2-debian AS forego
44

55
# Build the final image
6-
FROM nginx:1.25.3
6+
FROM docker.io/library/nginx:1.27.2
77

88
ARG NGINX_PROXY_VERSION
99
# Add DOCKER_GEN_VERSION environment variable because
@@ -14,8 +14,13 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
1414
DOCKER_HOST=unix:///tmp/docker.sock
1515

1616
# Configure Nginx
17-
RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
18-
&& mkdir -p '/etc/nginx/dhparam'
17+
RUN echo "\ninclude /etc/nginx/toplevel.conf.d/*.conf;" >> /etc/nginx/nginx.conf \
18+
&& sed -i 's/worker_connections.*;$/worker_connections 10240;/' /etc/nginx/nginx.conf \
19+
&& sed -i -e '/^\}$/{s//\}\nworker_rlimit_nofile 20480;/;:a' -e '$!N;$!ba' -e '}' /etc/nginx/nginx.conf \
20+
&& mkdir -p '/etc/nginx/toplevel.conf.d' \
21+
&& mkdir -p '/etc/nginx/dhparam' \
22+
&& mkdir -p '/etc/nginx/certs' \
23+
&& mkdir -p '/usr/share/nginx/html/errors'
1924

2025
# Install Forego + docker-gen
2126
COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[![Test](https://github.com/nginx-proxy/nginx-proxy/actions/workflows/test.yml/badge.svg)](https://github.com/nginx-proxy/nginx-proxy/actions/workflows/test.yml)
22
[![GitHub release](https://img.shields.io/github/v/release/nginx-proxy/nginx-proxy)](https://github.com/nginx-proxy/nginx-proxy/releases)
3-
![nginx 1.25.3](https://img.shields.io/badge/nginx-1.25.3-brightgreen.svg)
3+
[![nginx 1.27.2](https://img.shields.io/badge/nginx-1.27.2-brightgreen.svg?logo=nginx)](https://nginx.org/en/CHANGES)
44
[![Docker Image Size](https://img.shields.io/docker/image-size/nginxproxy/nginx-proxy?sort=semver)](https://hub.docker.com/r/nginxproxy/nginx-proxy "Click to view the image on Docker Hub")
5-
[![Docker stars](https://img.shields.io/docker/stars/nginxproxy/nginx-proxy.svg)](https://hub.docker.com/r/nginxproxy/nginx-proxy 'DockerHub')
6-
[![Docker pulls](https://img.shields.io/docker/pulls/nginxproxy/nginx-proxy.svg)](https://hub.docker.com/r/nginxproxy/nginx-proxy 'DockerHub')
7-
5+
[![Docker stars](https://img.shields.io/docker/stars/nginxproxy/nginx-proxy.svg)](https://hub.docker.com/r/nginxproxy/nginx-proxy "DockerHub")
6+
[![Docker pulls](https://img.shields.io/docker/pulls/nginxproxy/nginx-proxy.svg)](https://hub.docker.com/r/nginxproxy/nginx-proxy "DockerHub")
87

98
nginx-proxy sets up a container running nginx and [docker-gen](https://github.com/nginx-proxy/docker-gen). docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped.
109

@@ -19,7 +18,7 @@ docker run --detach \
1918
--name nginx-proxy \
2019
--publish 80:80 \
2120
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
22-
nginxproxy/nginx-proxy:1.4
21+
nginxproxy/nginx-proxy:1.6
2322
```
2423

2524
Then start any containers (here an nginx container) you want proxied with an env var `VIRTUAL_HOST=subdomain.yourdomain.com`
@@ -34,6 +33,7 @@ docker run --detach \
3433
Provided your DNS is setup to resolve `foo.bar.com` to the host running nginx-proxy, a request to `http://foo.bar.com` will then be routed to a container with the `VIRTUAL_HOST` env var set to `foo.bar.com` (in this case, the **your-proxied-app** container).
3534

3635
The containers being proxied must :
36+
3737
- [expose](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) the port to be proxied, either by using the `EXPOSE` directive in their `Dockerfile` or by using the `--expose` flag to `docker run` or `docker create`.
3838
- share at least one Docker network with the nginx-proxy container: by default, if you don't pass the `--net` flag when your nginx-proxy container is created, it will only be attached to the default bridge network. This means that it will not be able to connect to containers on networks other than bridge.
3939

@@ -48,22 +48,22 @@ The nginx-proxy images are available in two flavors.
4848
This image is based on the nginx:mainline image, itself based on the debian slim image.
4949

5050
```console
51-
docker pull nginxproxy/nginx-proxy:1.4
51+
docker pull nginxproxy/nginx-proxy:1.6
5252
```
5353

5454
#### Alpine based version (`-alpine` suffix)
5555

5656
This image is based on the nginx:alpine image.
5757

5858
```console
59-
docker pull nginxproxy/nginx-proxy:1.4-alpine
59+
docker pull nginxproxy/nginx-proxy:1.6-alpine
6060
```
6161

6262
#### :warning: a note on `latest` and `alpine`:
6363

6464
It is not recommended to use the `latest` (`nginxproxy/nginx-proxy`, `nginxproxy/nginx-proxy:latest`) or `alpine` (`nginxproxy/nginx-proxy:alpine`) tag for production setups.
6565

66-
Those tags points to the latest commit in the `main` branch. They do not carry any promise of stability, and using them will probably put your nginx-proxy setup at risk of experiencing uncontrolled updates to non backward compatible versions (or versions with breaking changes). You should always specify the version you want to use explicitly to ensure your setup doesn't break when the image is updated.
66+
[Those tags point](https://hub.docker.com/r/nginxproxy/nginx-proxy/tags) to the latest commit in the `main` branch. They do not carry any promise of stability, and using them will probably put your nginx-proxy setup at risk of experiencing uncontrolled updates to non backward compatible versions (or versions with breaking changes). You should always specify the version you want to use explicitly to ensure your setup doesn't break when the image is updated.
6767

6868
### Additional documentation
6969

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ services:
99
volumes:
1010
- /var/run/docker.sock:/tmp/docker.sock:ro
1111

12+
# if you want to proxy based on host ports, you'll want to use the host network
13+
# network_mode: "host"
14+
1215
whoami:
1316
image: jwilder/whoami
1417
environment:

0 commit comments

Comments
 (0)