Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .editorconfig
100755 → 100644
Empty file.
Empty file modified .github/CONTRIBUTING.md
100755 → 100644
Empty file.
Empty file modified .github/FUNDING.yml
100755 → 100644
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/config.yml
100755 → 100644
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/issue.bug.yml
100755 → 100644
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/issue.feature.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/call_issue_pr_tracker.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/call_issues_cron.yml
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions .github/workflows/external_trigger.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of master branch. To disable this trigger, add \`nginx_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
echo "Type is \`alpine_repo\`" >> $GITHUB_STEP_SUMMARY
if grep -q "^nginx_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
echo "New version \`${EXT_RELEASE}\` found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="New version ${EXT_RELEASE} for nginx tag latest is detected, however not all arch repos are updated yet. Will try again later."
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
Expand Down
Empty file modified .github/workflows/external_trigger_scheduler.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/greetings.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/package_trigger_scheduler.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/permissions.yml
100755 → 100644
Empty file.
65 changes: 32 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.21
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.22

# set version label
ARG BUILD_DATE
Expand All @@ -13,7 +13,7 @@ LABEL maintainer="nemchik"
# install packages
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache \
Expand All @@ -38,37 +38,36 @@ RUN \
nginx-mod-stream-geoip==${NGINX_VERSION} \
nginx-mod-stream-geoip2==${NGINX_VERSION} \
nginx-vim==${NGINX_VERSION} \
php83-bcmath \
php83-bz2 \
php83-dom \
php83-exif \
php83-ftp \
php83-gd \
php83-gmp \
php83-imap \
php83-intl \
php83-ldap \
php83-mysqli \
php83-mysqlnd \
php83-opcache \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-apcu \
php83-pecl-mcrypt \
php83-pecl-memcached \
php83-pecl-redis \
php83-pgsql \
php83-posix \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-tokenizer \
php83-xmlreader \
php83-xsl && \
php84-bcmath \
php84-bz2 \
php84-dom \
php84-exif \
php84-ftp \
php84-gd \
php84-gmp \
php84-imap \
php84-intl \
php84-ldap \
php84-mysqli \
php84-mysqlnd \
php84-opcache \
php84-pdo_mysql \
php84-pdo_odbc \
php84-pdo_pgsql \
php84-pdo_sqlite \
php84-pear \
php84-pecl-apcu \
php84-pecl-memcached \
php84-pecl-redis \
php84-pgsql \
php84-posix \
php84-soap \
php84-sockets \
php84-sodium \
php84-sqlite3 \
php84-tokenizer \
php84-xmlreader \
php84-xsl && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
rm -f /etc/nginx/conf.d/stream.conf

Expand Down
65 changes: 32 additions & 33 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.21
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.22

# set version label
ARG BUILD_DATE
Expand All @@ -13,7 +13,7 @@ LABEL maintainer="nemchik"
# install packages
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache \
Expand All @@ -38,37 +38,36 @@ RUN \
nginx-mod-stream-geoip==${NGINX_VERSION} \
nginx-mod-stream-geoip2==${NGINX_VERSION} \
nginx-vim==${NGINX_VERSION} \
php83-bcmath \
php83-bz2 \
php83-dom \
php83-exif \
php83-ftp \
php83-gd \
php83-gmp \
php83-imap \
php83-intl \
php83-ldap \
php83-mysqli \
php83-mysqlnd \
php83-opcache \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-apcu \
php83-pecl-mcrypt \
php83-pecl-memcached \
php83-pecl-redis \
php83-pgsql \
php83-posix \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-tokenizer \
php83-xmlreader \
php83-xsl && \
php84-bcmath \
php84-bz2 \
php84-dom \
php84-exif \
php84-ftp \
php84-gd \
php84-gmp \
php84-imap \
php84-intl \
php84-ldap \
php84-mysqli \
php84-mysqlnd \
php84-opcache \
php84-pdo_mysql \
php84-pdo_odbc \
php84-pdo_pgsql \
php84-pdo_sqlite \
php84-pear \
php84-pecl-apcu \
php84-pecl-memcached \
php84-pecl-redis \
php84-pgsql \
php84-posix \
php84-soap \
php84-sockets \
php84-sodium \
php84-sqlite3 \
php84-tokenizer \
php84-xmlreader \
php84-xsl && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
rm -f /etc/nginx/conf.d/stream.conf

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/nginx'
PR_DOCKERHUB_IMAGE = 'lspipepr/nginx'
DIST_IMAGE = 'alpine'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.21/main/'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.22/main/'
DIST_REPO_PACKAGES = 'nginx'
MULTIARCH='true'
CI='true'
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ services:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- NGINX_AUTORELOAD= #optional
- NGINX_AUTORELOAD_WATCHLIST= #optional
volumes:
- /path/to/nginx/config:/config
ports:
Expand All @@ -105,6 +107,8 @@ docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e NGINX_AUTORELOAD= `#optional` \
-e NGINX_AUTORELOAD_WATCHLIST= `#optional` \
-p 80:80 \
-p 443:443 \
-v /path/to/nginx/config:/config \
Expand All @@ -123,6 +127,8 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e NGINX_AUTORELOAD=` | Set to `true` to enable automatic reloading of confs on change without stopping/restarting nginx. Your filesystem must support inotify. This functionality was previously offered [via mod](https://github.com/linuxserver/docker-mods/tree/swag-auto-reload). |
| `-e NGINX_AUTORELOAD_WATCHLIST=` | A [pipe](https://en.wikipedia.org/wiki/Vertical_bar)-separated list of additional folders for auto reload to watch in addition to `/config/nginx` |
| `-v /config` | Persistent config files |
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |

Expand Down Expand Up @@ -288,6 +294,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **16.06.25:** - Rebase to Alpine 3.22 with PHP 8.4. Add [Auto Reload](https://github.com/linuxserver/docker-mods/tree/swag-auto-reload) functionality. Drop PHP bindings for mcrypt as it is no longer maintained.
* **17.12.24:** - Rebase to Alpine 3.21.
* **31.05.24:** - Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings.
* **05.03.24:** - Rebase to Alpine 3.19 with php 8.3.
Expand Down
2 changes: 1 addition & 1 deletion jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/nginx'
- PR_DOCKERHUB_IMAGE = 'lspipepr/nginx'
- DIST_IMAGE = 'alpine'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.21/main/'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.22/main/'
- DIST_REPO_PACKAGES = 'nginx'
- MULTIARCH='true'
- CI='true'
Expand Down
5 changes: 5 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ param_usage_include_ports: true
param_ports:
- {external_port: "80", internal_port: "80", port_desc: "http"}
- {external_port: "443", internal_port: "443", port_desc: "https"}
opt_param_usage_include_env: true
opt_param_env_vars:
- {env_var: "NGINX_AUTORELOAD", env_value: "", desc: "Set to `true` to enable automatic reloading of confs on change without stopping/restarting nginx. Your filesystem must support inotify. This functionality was previously offered [via mod](https://github.com/linuxserver/docker-mods/tree/swag-auto-reload)."}
- {env_var: "NGINX_AUTORELOAD_WATCHLIST", env_value: "", desc: "A [pipe](https://en.wikipedia.org/wiki/Vertical_bar)-separated list of additional folders for auto reload to watch in addition to `/config/nginx`"}
readonly_supported: true
readonly_message: |
* `/tmp` must be mounted to tmpfs
Expand Down Expand Up @@ -81,6 +85,7 @@ init_diagram: |
"nginx:latest" <- Base Images
# changelog
changelogs:
- {date: "16.06.25:", desc: "Rebase to Alpine 3.22 with PHP 8.4. Add [Auto Reload](https://github.com/linuxserver/docker-mods/tree/swag-auto-reload) functionality. Drop PHP bindings for mcrypt as it is no longer maintained."}
- {date: "17.12.24:", desc: "Rebase to Alpine 3.21."}
- {date: "31.05.24:", desc: "Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings."}
- {date: "05.03.24:", desc: "Rebase to Alpine 3.19 with php 8.3."}
Expand Down
42 changes: 42 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-nginx-auto-reload/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [[ ${NGINX_AUTORELOAD,,} == "true" ]]; then
if [[ -f "/etc/s6-overlay/s6-rc.d/svc-mod-swag-auto-reload/run" ]]; then
echo "ERROR: Legacy SWAG Auto Reload Mod detected, to use the built-in Auto Reload functionality please remove it from your container config"
echo " and update your environment variables as per the image documentation."
sleep infinity
else
echo "Auto-reload: Watching the following folders for changes to .conf files:"
echo "/config/nginx"
ACTIVE_WATCH=("/config/nginx")
for i in $(echo "${NGINX_AUTORELOAD_WATCHLIST}" | tr "|" " "); do
if [ -f "${i}" ] || [ -d "${i}" ]; then
echo "${i}"
ACTIVE_WATCH+=("${i}")
fi
done

function wait_for_changes {
inotifywait -rq \
--event modify,move,create,delete \
--includei '\.conf$' \
"${ACTIVE_WATCH[@]}"
}

while wait_for_changes; do
NGINX_CONF=()
if ! grep -q "/config/nginx/nginx.conf" /etc/nginx/nginx.conf; then
NGINX_CONF=("-c" "/config/nginx/nginx.conf")
fi
if /usr/sbin/nginx "${NGINX_CONF[@]}" -t; then
echo "Changes to nginx config detected and the changes are valid, reloading nginx"
/usr/sbin/nginx "${NGINX_CONF[@]}" -s reload
else
echo "Changes to nginx config detected but the changes are not valid, skipping nginx reload. Please fix your config."
fi
done
fi
else
sleep infinity
fi
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-nginx-auto-reload/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun