Skip to content

Commit

Permalink
Merge pull request #2359 from nginx-proxy/cleanup-dockerfiles
Browse files Browse the repository at this point in the history
refactor: cleanup dockerfiles
  • Loading branch information
buchdag committed Dec 25, 2023
2 parents 4a8aa5d + eb9fca8 commit 4fbd14f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
10 changes: 2 additions & 8 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
DOCKER_HOST=unix:///tmp/docker.sock

# Install dependencies
RUN apk add --no-cache --virtual .run-deps \
bash \
ca-certificates \
openssl \
&& update-ca-certificates
RUN apk add --no-cache --virtual .run-deps bash

# 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 \
RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
&& mkdir -p '/etc/nginx/dhparam'

# Install Forego + docker-gen
Expand Down
10 changes: 1 addition & 9 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,8 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \
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
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 \
RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
&& mkdir -p '/etc/nginx/dhparam'

# Install Forego + docker-gen
Expand Down
2 changes: 1 addition & 1 deletion app/Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dockergen: docker-gen -watch -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf
nginx: nginx
nginx: nginx -g "daemon off;"

0 comments on commit 4fbd14f

Please sign in to comment.