1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 09:48:14 +00:00

Merge pull request #2359 from nginx-proxy/cleanup-dockerfiles

refactor: cleanup dockerfiles
This commit is contained in:
Nicolas Duchon 2023-12-25 20:22:37 +01:00 committed by GitHub
commit 4fbd14f1fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 18 deletions

View File

@ -14,16 +14,10 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
DOCKER_HOST=unix:///tmp/docker.sock DOCKER_HOST=unix:///tmp/docker.sock
# Install dependencies # Install dependencies
RUN apk add --no-cache --virtual .run-deps \ RUN apk add --no-cache --virtual .run-deps bash
bash \
ca-certificates \
openssl \
&& update-ca-certificates
# Configure Nginx # Configure Nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \ RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /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' && mkdir -p '/etc/nginx/dhparam'
# Install Forego + docker-gen # Install Forego + docker-gen

View File

@ -13,16 +13,8 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \ DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \
DOCKER_HOST=unix:///tmp/docker.sock DOCKER_HOST=unix:///tmp/docker.sock
# Install/update certificates
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends ca-certificates \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
# Configure Nginx # Configure Nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \ RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /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' && mkdir -p '/etc/nginx/dhparam'
# Install Forego + docker-gen # Install Forego + docker-gen

View File

@ -1,2 +1,2 @@
dockergen: docker-gen -watch -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf dockergen: docker-gen -watch -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf
nginx: nginx nginx: nginx -g "daemon off;"