diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2c42a06..f2656a5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -32,4 +32,4 @@ jobs: install: true - name: Build and push with Buildx - run: docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.23.1 --push + run: docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.25.3 --push diff --git a/Dockerfile b/Dockerfile index 52249d6..28dfe20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.16 -ENV NGINX_VERSION 1.23.1 +ENV NGINX_VERSION 1.25.3 RUN apk update && apk add curl gettext bash RUN apk add --virtual nginx \ @@ -23,4 +23,8 @@ RUN curl -LSs http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -O # RUN apk del nginx +COPY nginx.conf.default /usr/local/nginx/conf/nginx.conf + WORKDIR / + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index 23a2fdb..f2fb33e 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,4 @@ This docker image was created to have nginx running in alpine, with ngx_http_pro This image was built using -`docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.23.1 --push` +`docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.25.3 --push` diff --git a/nginx.conf.default b/nginx.conf.default new file mode 100644 index 0000000..0c79378 --- /dev/null +++ b/nginx.conf.default @@ -0,0 +1,38 @@ +worker_processes 1; + +http { + include mime.types; + + map $http_user_agent $log_ua { + ~healthcheck 0; + + default 1; + } + + server { + listen 8080; + + allow 10.0.0.0/8; + deny all; + + access_log /var/log/proxy_access.log combined if=$log_ua; + access_log /dev/stdout; + error_log /dev/stderr; + + resolver 1.1.1.1 ipv6=off; + + proxy_connect; + proxy_connect_allow 443 563; + proxy_connect_connect_timeout 60s; + proxy_connect_read_timeout 60s; + proxy_connect_send_timeout 60s; + + location / { + client_max_body_size 0; + proxy_http_version 1.1; + proxy_set_header Host $host; + + proxy_pass http://$host; + } + } +}