1
0
Fork 0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-05-07 08:06:11 +02:00
nginx-proxy/Dockerfile.alpine
dependabot[bot] 3a66659e63
build: bump nginx from 1.23.4-alpine to 1.25.0-alpine
Bumps nginx from 1.23.4-alpine to 1.25.0-alpine.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 04:57:50 +00:00

40 lines
1.2 KiB
Docker

FROM nginxproxy/docker-gen:0.10.4 AS docker-gen
FROM nginxproxy/forego:0.17.1 AS forego
# Build the final image
FROM nginx:1.25.0-alpine
ARG NGINX_PROXY_VERSION
# Add DOCKER_GEN_VERSION environment variable because
# acme-companion rely on it (but the actual value is not important)
ARG DOCKER_GEN_VERSION="unknown"
ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \
DOCKER_HOST=unix:///tmp/docker.sock
# Install dependencies
RUN apk add --no-cache --virtual .run-deps \
bash \
ca-certificates \
openssl \
&& update-ca-certificates
# Configure Nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
&& sed -i 's/worker_processes 1/worker_processes auto/' /etc/nginx/nginx.conf \
&& sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
&& mkdir -p '/etc/nginx/dhparam'
# Install Forego + docker-gen
COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego
COPY --from=docker-gen /usr/local/bin/docker-gen /usr/local/bin/docker-gen
COPY network_internal.conf /etc/nginx/
COPY app nginx.tmpl LICENSE /app/
WORKDIR /app/
ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["forego", "start", "-r"]