Compare commits

..

No commits in common. "master" and "f104ec71-ls58" have entirely different histories.

29 changed files with 837 additions and 2145 deletions

View File

@ -1,20 +0,0 @@
# This file is globally distributed to all container image projects from
# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# trim_trailing_whitespace may cause unintended issues and should not be globally set true
trim_trailing_whitespace = false
[{Dockerfile*,**.yml}]
indent_style = space
indent_size = 2
[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}]
indent_style = space
indent_size = 4

View File

@ -1,123 +0,0 @@
# Contributing to nginx
## Gotchas
* While contributing make sure to make all your changes before creating a Pull Request, as our pipeline builds each commit after the PR is open.
* Read, and fill the Pull Request template
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord)
## Common files
| File | Use case |
| :----: | --- |
| `Dockerfile` | Dockerfile used to build amd64 images |
| `Dockerfile.aarch64` | Dockerfile used to build 64bit ARM architectures |
| `Dockerfile.armhf` | Dockerfile used to build 32bit ARM architectures |
| `Jenkinsfile` | This file is a product of our builder and should not be edited directly. This is used to build the image |
| `jenkins-vars.yml` | This file is used to generate the `Jenkinsfile` mentioned above, it only affects the build-process |
| `package_versions.txt` | This file is generated as a part of the build-process and should not be edited directly. It lists all the installed packages and their versions |
| `README.md` | This file is a product of our builder and should not be edited directly. This displays the readme for the repository and image registries |
| `readme-vars.yml` | This file is used to generate the `README.md` |
## Readme
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-nginx/edit/master/readme-vars.yml).
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-nginx)
### Fixing typos or clarify the text in the readme
There are variables for multiple parts of the readme, the most common ones are:
| Variable | Description |
| :----: | --- |
| `project_blurb` | This is the short excerpt shown above the project logo. |
| `app_setup_block` | This is the text that shows up under "Application Setup" if enabled |
### Parameters
The compose and run examples are also generated from these variables.
We have a [reference file](https://github.com/linuxserver/docker-jenkins-builder/blob/master/vars/_container-vars-blank) in our Jenkins Builder.
These are prefixed with `param_` for required parameters, or `opt_param` for optional parameters, except for `cap_add`.
Remember to enable param, if currently disabled. This differs between parameters, and can be seen in the reference file.
Devices, environment variables, ports and volumes expects its variables in a certain way.
### Devices
```yml
param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
opt_param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
```
### Environment variables
```yml
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
opt_param_env_vars:
- { env_var: "VERSION", env_value: "latest", desc: "Supported values are LATEST, PLEXPASS or a specific version number." }
```
### Ports
```yml
param_ports:
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
opt_param_ports:
- { external_port: "80", internal_port: "80", port_desc: "Application WebUI" }
```
### Volumes
```yml
param_volumes:
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
opt_param_volumes:
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Configuration files." }
```
### Testing template changes
After you make any changes to the templates, you can use our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) to have the files updated from the modified templates. Please use the command found under `Running Locally` [on this page](https://github.com/linuxserver/docker-jenkins-builder/blob/master/README.md) to generate them prior to submitting a PR.
## Dockerfiles
We use multiple Dockerfiles in our repos, this is because sometimes some CPU architectures needs different packages to work.
If you are proposing additional packages to be added, ensure that you added the packages to all the Dockerfiles in alphabetical order.
### Testing your changes
```bash
git clone https://github.com/linuxserver/docker-nginx.git
cd docker-nginx
docker build \
--no-cache \
--pull \
-t linuxserver/nginx:latest .
```
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
```bash
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Update the changelog
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-nginx/tree/master/root), add an entry to the changelog
```yml
changelogs:
- { date: "DD.MM.YY:", desc: "Added some love to templates" }
```

1
.github/FUNDING.yml vendored Normal file → Executable file
View File

@ -1,2 +1 @@
github: linuxserver
open_collective: linuxserver

34
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,34 @@
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support.
<!--- Provide a general summary of the issue in the Title above -->
------------------------------
## Expected Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Environment
**OS:**
**CPU architecture:** x86_64/arm32/arm64
**How docker service was installed:**
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Command used to create docker container (run/create/compose/screenshot)
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
## Docker logs
<!--- Provide a full docker log, output of "docker logs nginx" -->

View File

@ -1,13 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Discord chat support
url: https://linuxserver.io/discord
about: Realtime support / chat with the community and the team.
- name: Discourse discussion forum
url: https://discourse.linuxserver.io
about: Post on our community forum.
- name: Documentation
url: https://docs.linuxserver.io/images/docker-nginx
about: Documentation - information about all of our containers.

View File

@ -1,76 +0,0 @@
# Based on the issue template
name: Bug report
description: Create a report to help us improve
title: "[BUG] <title>"
labels: [Bug]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: Tell us what happens instead of the expected behavior.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: Tell us what should happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **How docker service was installed**: distro's packagemanager
value: |
- OS:
- How docker service was installed:
render: markdown
validations:
required: false
- type: dropdown
attributes:
label: CPU architecture
options:
- x86-64
- arm64
validations:
required: true
- type: textarea
attributes:
label: Docker creation
description: |
Command used to create docker container
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
render: bash
validations:
required: true
- type: textarea
attributes:
description: |
Provide a full docker log, output of "docker logs nginx"
label: Container logs
placeholder: |
Output of `docker logs nginx`
render: bash
validations:
required: true

View File

@ -1,31 +0,0 @@
# Based on the issue template
name: Feature request
description: Suggest an idea for this project
title: "[FEAT] <title>"
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Is this a new feature request?
description: Please search to see if a feature request already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Wanted change
description: Tell us what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Reason for change
description: Justify your request, why do you want it, what is the benefit.
validations:
required: true
- type: textarea
attributes:
label: Proposed code change
description: Do you have a potential code change in mind?
validations:
required: false

View File

@ -2,11 +2,11 @@
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- Before submitting a pull request please check the following -->
<!--- If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR -->
<!--- If this is a fix for a typo in code or documentation in the README please file an issue and let us sort it out we do not need a PR -->
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
@ -21,11 +21,7 @@
------------------------------
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-nginx/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
------------------------------
<!--- We welcome all PRs though this doesnt guarantee it will be accepted. -->
We welcome all PRs though this doesnt guarantee it will be accepted.
## Description:
<!--- Describe your changes in detail -->

View File

@ -1,19 +0,0 @@
name: Issue & PR Tracker
on:
issues:
types: [opened,reopened,labeled,unlabeled,closed]
pull_request_target:
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
pull_request_review:
types: [submitted,edited,dismissed]
permissions:
contents: read
jobs:
manage-project:
permissions:
issues: write
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
secrets: inherit

View File

@ -1,16 +0,0 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: '32 4 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
permissions:
issues: write
pull-requests: write
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
secrets: inherit

View File

@ -1,155 +0,0 @@
name: External Trigger Main
on:
workflow_dispatch:
permissions:
contents: read
jobs:
external-trigger-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: External Trigger
if: github.ref == 'refs/heads/master'
env:
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
run: |
printf "# External trigger for docker-nginx\n\n" >> $GITHUB_STEP_SUMMARY
if grep -q "^nginx_master_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`nginx_master_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
elif grep -q "^nginx_master" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`nginx_master\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
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.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
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve external version for nginx branch master"
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-nginx/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
image="linuxserver/nginx"
tag="latest"
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fnginx%3Apull" \
| jq -r '.token')
multidigest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Accept: application/vnd.oci.image.index.v1+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}")
if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then
# If there's a layer element it's a single-arch manifest so just get that digest
digest=$(jq -r '.config.digest' <<< "${multidigest}")
else
# Otherwise it's multi-arch or has manifest annotations
if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then
# Check for manifest annotations and delete if found
multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}")
fi
if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then
# If there's still more than one digest, it's multi-arch
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
else
# Otherwise it's single arch
multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}")
fi
if digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
digest=$(jq -r '.config.digest' <<< "${digest}");
fi
fi
image_info=$(curl -sL \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/blobs/${digest}")
if [[ $(echo $image_info | jq -r '.container_config') == "null" ]]; then
image_info=$(echo $image_info | jq -r '.config')
else
image_info=$(echo $image_info | jq -r '.container_config')
fi
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
if [ -z "${IMAGE_VERSION}" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve last pushed version for nginx tag latest"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
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,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 0
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nginx/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
exit 0
else
if [[ "${artifacts_found}" == "false" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="New version ${EXT_RELEASE} for nginx tag latest is detected, however not all artifacts are uploaded to upstream release 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,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
else
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
if [[ "${artifacts_found}" == "true" ]]; then
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
fi
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nginx/job/master/buildWithParameters?PACKAGE_CHECK=false \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"
echo "**** Notifying Discord ****"
TRIGGER_REASON="A version change was detected for nginx tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
fi
fi

View File

@ -1,48 +0,0 @@
name: External Trigger Scheduler
on:
schedule:
- cron: '54 * * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: External Trigger Scheduler
run: |
printf "# External trigger scheduler for docker-nginx\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-nginx/${br}/jenkins-vars.yml)
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-nginx/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"ref\":\"refs/heads/${br}\"}" \
https://api.github.com/repos/linuxserver/docker-nginx/actions/workflows/external_trigger.yml/dispatches
else
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
fi
else
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
fi
done

View File

@ -1,19 +0,0 @@
name: Greetings
on: [pull_request_target, issues]
permissions:
contents: read
jobs:
greeting:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-nginx/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,103 +0,0 @@
name: Package Trigger Scheduler
on:
schedule:
- cron: '5 4 * * 4'
workflow_dispatch:
permissions:
contents: read
jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Package Trigger Scheduler
env:
SKIP_PACKAGE_TRIGGER: ${{ vars.SKIP_PACKAGE_TRIGGER }}
run: |
printf "# Package trigger scheduler for docker-nginx\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-nginx/${br}/jenkins-vars.yml)
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-nginx/${br}/Jenkinsfile >/dev/null 2>&1; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-nginx/${br}/readme-vars.yml)
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif grep -q "^nginx_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`nginx_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nginx/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
else
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Triggering package trigger for branch ${br}" >> $GITHUB_STEP_SUMMARY
printf "> To disable, add \`nginx_%s\` into the Github organizational variable \`SKIP_PACKAGE_TRIGGER\`.\n\n" "${br}" >> $GITHUB_STEP_SUMMARY
triggered_branches="${triggered_branches}${br} "
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nginx/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
if [[ -z "${response}" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Jenkins build could not be triggered. Skipping branch."
continue
fi
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
if ! curl -ifX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Unable to change the Jenkins job description."
fi
sleep 20
fi
else
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
fi
done
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
if [[ -n "${triggered_branches}" ]]; then
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-nginx/activity/ \n"
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
fi
if [[ -n "${skipped_branches}" ]]; then
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
fi
echo "**** Notifying Discord ****"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Package Check Build(s) for nginx** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
fi

View File

@ -1,12 +0,0 @@
name: Permission check
on:
pull_request_target:
paths:
- '**/run'
- '**/finish'
- '**/check'
- 'root/migrations/*'
jobs:
permission_check:
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

1
.gitignore vendored
View File

@ -41,4 +41,3 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk
.jenkins-external

View File

@ -1,81 +1,71 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.22
FROM lsiobase/nginx:3.10
# set version label
ARG BUILD_DATE
ARG VERSION
ARG NGINX_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="nemchik"
LABEL maintainer="Stian Larsen,sparklyballs,aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
# install packages
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
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 \
inotify-tools \
memcached \
nginx==${NGINX_VERSION} \
nginx-mod-http-brotli==${NGINX_VERSION} \
nginx-mod-http-dav-ext==${NGINX_VERSION} \
nginx-mod-http-echo==${NGINX_VERSION} \
nginx-mod-http-fancyindex==${NGINX_VERSION} \
nginx-mod-http-geoip==${NGINX_VERSION} \
nginx-mod-http-geoip2==${NGINX_VERSION} \
nginx-mod-http-headers-more==${NGINX_VERSION} \
nginx-mod-http-image-filter==${NGINX_VERSION} \
nginx-mod-http-perl==${NGINX_VERSION} \
nginx-mod-http-redis2==${NGINX_VERSION} \
nginx-mod-http-set-misc==${NGINX_VERSION} \
nginx-mod-http-upload-progress==${NGINX_VERSION} \
nginx-mod-http-xslt-filter==${NGINX_VERSION} \
nginx-mod-mail==${NGINX_VERSION} \
nginx-mod-rtmp==${NGINX_VERSION} \
nginx-mod-stream==${NGINX_VERSION} \
nginx-mod-stream-geoip==${NGINX_VERSION} \
nginx-mod-stream-geoip2==${NGINX_VERSION} \
nginx-vim==${NGINX_VERSION} \
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
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config
apk add --no-cache --upgrade \
curl \
memcached \
nginx \
nginx-mod-http-echo \
nginx-mod-http-fancyindex \
nginx-mod-http-geoip \
nginx-mod-http-headers-more \
nginx-mod-http-image-filter \
nginx-mod-http-lua \
nginx-mod-http-lua-upstream \
nginx-mod-http-nchan \
nginx-mod-http-perl \
nginx-mod-http-redis2 \
nginx-mod-http-set-misc \
nginx-mod-http-upload-progress \
nginx-mod-http-xslt-filter \
nginx-mod-mail \
nginx-mod-rtmp \
nginx-mod-stream \
nginx-mod-stream-geoip \
nginx-vim \
php7-bcmath \
php7-bz2 \
php7-ctype \
php7-curl \
php7-dom \
php7-exif \
php7-ftp \
php7-gd \
php7-iconv \
php7-intl \
php7-ldap \
php7-mcrypt \
php7-memcached \
php7-mysqli \
php7-mysqlnd \
php7-opcache \
php7-pdo_mysql \
php7-pdo_odbc \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-pear \
php7-pecl-imagick \
php7-pecl-redis \
php7-pgsql \
php7-phar \
php7-posix \
php7-soap \
php7-sockets \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-xmlrpc \
php7-zip && \
echo "**** configure nginx ****" && \
rm -f /etc/nginx/conf.d/default.conf

View File

@ -1,81 +1,71 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.22
FROM lsiobase/nginx:arm64v8-3.10
# set version label
ARG BUILD_DATE
ARG VERSION
ARG NGINX_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="nemchik"
LABEL maintainer="Stian Larsen,sparklyballs,aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
# install packages
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
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 \
inotify-tools \
memcached \
nginx==${NGINX_VERSION} \
nginx-mod-http-brotli==${NGINX_VERSION} \
nginx-mod-http-dav-ext==${NGINX_VERSION} \
nginx-mod-http-echo==${NGINX_VERSION} \
nginx-mod-http-fancyindex==${NGINX_VERSION} \
nginx-mod-http-geoip==${NGINX_VERSION} \
nginx-mod-http-geoip2==${NGINX_VERSION} \
nginx-mod-http-headers-more==${NGINX_VERSION} \
nginx-mod-http-image-filter==${NGINX_VERSION} \
nginx-mod-http-perl==${NGINX_VERSION} \
nginx-mod-http-redis2==${NGINX_VERSION} \
nginx-mod-http-set-misc==${NGINX_VERSION} \
nginx-mod-http-upload-progress==${NGINX_VERSION} \
nginx-mod-http-xslt-filter==${NGINX_VERSION} \
nginx-mod-mail==${NGINX_VERSION} \
nginx-mod-rtmp==${NGINX_VERSION} \
nginx-mod-stream==${NGINX_VERSION} \
nginx-mod-stream-geoip==${NGINX_VERSION} \
nginx-mod-stream-geoip2==${NGINX_VERSION} \
nginx-vim==${NGINX_VERSION} \
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
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config
apk add --no-cache --upgrade \
curl \
memcached \
nginx \
nginx-mod-http-echo \
nginx-mod-http-fancyindex \
nginx-mod-http-geoip \
nginx-mod-http-headers-more \
nginx-mod-http-image-filter \
nginx-mod-http-lua \
nginx-mod-http-lua-upstream \
nginx-mod-http-nchan \
nginx-mod-http-perl \
nginx-mod-http-redis2 \
nginx-mod-http-set-misc \
nginx-mod-http-upload-progress \
nginx-mod-http-xslt-filter \
nginx-mod-mail \
nginx-mod-rtmp \
nginx-mod-stream \
nginx-mod-stream-geoip \
nginx-vim \
php7-bcmath \
php7-bz2 \
php7-ctype \
php7-curl \
php7-dom \
php7-exif \
php7-ftp \
php7-gd \
php7-iconv \
php7-intl \
php7-ldap \
php7-mcrypt \
php7-memcached \
php7-mysqli \
php7-mysqlnd \
php7-opcache \
php7-pdo_mysql \
php7-pdo_odbc \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-pear \
php7-pecl-imagick \
php7-pecl-redis \
php7-pgsql \
php7-phar \
php7-posix \
php7-soap \
php7-sockets \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-xmlrpc \
php7-zip && \
echo "**** configure nginx ****" && \
rm -f /etc/nginx/conf.d/default.conf

71
Dockerfile.armhf Normal file
View File

@ -0,0 +1,71 @@
FROM lsiobase/nginx:arm32v7-3.10
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Stian Larsen,sparklyballs,aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
# install packages
RUN \
apk add --no-cache --upgrade \
curl \
memcached \
nginx \
nginx-mod-http-echo \
nginx-mod-http-fancyindex \
nginx-mod-http-geoip \
nginx-mod-http-headers-more \
nginx-mod-http-image-filter \
nginx-mod-http-lua \
nginx-mod-http-lua-upstream \
nginx-mod-http-nchan \
nginx-mod-http-perl \
nginx-mod-http-redis2 \
nginx-mod-http-set-misc \
nginx-mod-http-upload-progress \
nginx-mod-http-xslt-filter \
nginx-mod-mail \
nginx-mod-rtmp \
nginx-mod-stream \
nginx-mod-stream-geoip \
nginx-vim \
php7-bcmath \
php7-bz2 \
php7-ctype \
php7-curl \
php7-dom \
php7-exif \
php7-ftp \
php7-gd \
php7-iconv \
php7-intl \
php7-ldap \
php7-mcrypt \
php7-memcached \
php7-mysqli \
php7-mysqlnd \
php7-opcache \
php7-pdo_mysql \
php7-pdo_odbc \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-pear \
php7-pecl-imagick \
php7-pecl-redis \
php7-pgsql \
php7-phar \
php7-posix \
php7-soap \
php7-sockets \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-xmlrpc \
php7-zip && \
echo "**** configure nginx ****" && \
rm -f /etc/nginx/conf.d/default.conf

1072
Jenkinsfile vendored

File diff suppressed because it is too large Load Diff

0
LICENSE Normal file → Executable file
View File

321
README.md
View File

@ -1,41 +1,40 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read https://github.com/linuxserver/docker-nginx/blob/master/.github/CONTRIBUTING.md -->
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://linuxserver.io/discord "realtime support / chat with the community and the team.")
[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.")
[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.")
[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
[![Blog](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
[![Discord](https://img.shields.io/discord/354974912613449730.svg?style=flat-square&color=E68523&label=Discord&logo=discord&logoColor=FFFFFF)](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?style=flat-square&color=E68523&logo=discourse&logoColor=FFFFFF)](https://discourse.linuxserver.io "post on our community forum.")
[![Fleet](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
[![GitHub](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=GitHub&logo=github&logoColor=FFFFFF)](https://github.com/linuxserver "view the source for all of our repositories.")
[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?style=flat-square&color=E68523&label=Supporters&logo=open%20collective&logoColor=FFFFFF)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring :-
* regular and timely application updates
* easy user mappings (PGID, PUID)
* custom base image with s6 overlay
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
* regular security updates
* regular and timely application updates
* easy user mappings (PGID, PUID)
* custom base image with s6 overlay
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
* regular security updates
Find us at:
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team.
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
# [linuxserver/nginx](https://github.com/linuxserver/docker-nginx)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fnginx?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh)
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-nginx.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-nginx)
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-nginx.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-nginx/releases)
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-nginx/packages)
[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-nginx/container_registry)
[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/nginx)
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/nginx.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/nginx)
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/nginx.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/nginx)
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-nginx%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nginx/job/master/)
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fnginx%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/nginx/latest/index.html)
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-nginx.svg?style=flat-square&color=E68523&logo=github&logoColor=FFFFFF)](https://github.com/linuxserver/docker-nginx)
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-nginx.svg?style=flat-square&color=E68523&logo=github&logoColor=FFFFFF)](https://github.com/linuxserver/docker-nginx/releases)
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=GitHub%20Package&logo=github&logoColor=FFFFFF)](https://github.com/linuxserver/docker-nginx/packages)
[![GitLab Container Registry](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab&logoColor=FFFFFF)](https://gitlab.com/Linuxserver.io/docker-nginx/container_registry)
[![Quay.io](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/nginx)
[![MicroBadger Layers](https://img.shields.io/microbadger/layers/linuxserver/nginx.svg?style=flat-square&color=E68523)](https://microbadger.com/images/linuxserver/nginx "Get your own version badge on microbadger.com")
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/nginx.svg?style=flat-square&color=E68523&label=pulls&logo=docker&logoColor=FFFFFF)](https://hub.docker.com/r/linuxserver/nginx)
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/nginx.svg?style=flat-square&color=E68523&label=stars&logo=docker&logoColor=FFFFFF)](https://hub.docker.com/r/linuxserver/nginx)
[![Build Status](https://ci.linuxserver.io/view/all/job/Docker-Pipeline-Builders/job/docker-nginx/job/master/badge/icon?style=flat-square)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nginx/job/master/)
[![](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/nginx/latest/badge.svg)](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/nginx/latest/index.html)
[Nginx](https://nginx.org/) is a simple webserver with php support. The config files reside in `/config` for easy user customization.
@ -43,276 +42,174 @@ Find us at:
## Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `lscr.io/linuxserver/nginx:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
Simply pulling `linuxserver/nginx` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| Architecture | Tag |
| :----: | --- |
| x86-64 | amd64-latest |
| arm64 | arm64v8-latest |
| armhf | arm32v7-latest |
## Application Setup
Add your web files to `/config/www` for hosting.
Modify the nginx, php and site config files under `/config` as needed
## Read-Only Operation
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
### Caveats
* `/tmp` must be mounted to tmpfs
## Usage
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
Here are some example snippets to help you get started creating a container.
>[!NOTE]
>Unless a parameter is flagged as 'optional', it is *mandatory* and a value must be provided.
### docker
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
```
docker create \
--name=nginx \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-p 80:80 \
-p 443:443 \
-v </path/to/appdata/config>:/config \
--restart unless-stopped \
linuxserver/nginx
```
```yaml
### docker-compose
Compatible with docker-compose v2 schemas.
```
---
version: "2"
services:
nginx:
image: lscr.io/linuxserver/nginx:latest
image: linuxserver/nginx
container_name: nginx
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- NGINX_AUTORELOAD= #optional
- NGINX_AUTORELOAD_WATCHLIST= #optional
- TZ=Europe/London
volumes:
- /path/to/nginx/config:/config
- </path/to/appdata/config>:/config
ports:
- 80:80
- 443:443
restart: unless-stopped
```
### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/))
```bash
docker run -d \
--name=nginx \
-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 \
--restart unless-stopped \
lscr.io/linuxserver/nginx:latest
```
## Parameters
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
| Parameter | Function |
| :----: | --- |
| `-p 80:80` | http |
| `-p 443:443` | https |
| `-p 80` | http |
| `-p 443` | https |
| `-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/). |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
| `-v /config` | Contains your www content and all relevant configuration files. |
## Environment variables from files (Docker secrets)
You can set any environment variable from a file by using a special prepend `FILE__`.
You can set any environment variable from a file by using a special prepend `FILE__`.
As an example:
```bash
-e FILE__MYVAR=/run/secrets/mysecretvariable
```
-e FILE__PASSWORD=/run/secrets/mysecretpassword
```
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
## Umask for running applications
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
## User / Group Identifiers
When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
```bash
id your_user
```
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
```
Example output:
```text
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
```
&nbsp;
## Application Setup
## Docker Mods
Add your web files to `/config/www` for hosting.
Modify the nginx, php and site config files under `/config` as needed
*Protip: This container is best combined with a sql server, e.g. [mariadb](https://hub.docker.com/r/linuxserver/mariadb/)*
[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=nginx&query=%24.mods%5B%27nginx%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=nginx "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
## Support Info
* Shell access whilst the container is running:
```bash
docker exec -it nginx /bin/bash
```
* To monitor the logs of the container in realtime:
```bash
docker logs -f nginx
```
* Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' nginx
```
* Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/nginx:latest
```
* Shell access whilst the container is running: `docker exec -it nginx /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f nginx`
* container version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' nginx`
* image version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/nginx`
## Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Below are the instructions for updating containers:
### Via Docker Run/Create
* Update the image: `docker pull linuxserver/nginx`
* Stop the running container: `docker stop nginx`
* Delete the container: `docker rm nginx`
* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* Start the new container: `docker start nginx`
* You can also remove the old dangling images: `docker image prune`
### Via Docker Compose
* Update all images: `docker-compose pull`
* or update a single image: `docker-compose pull nginx`
* Let compose update all containers as necessary: `docker-compose up -d`
* or update a single container: `docker-compose up -d nginx`
* You can also remove the old dangling images: `docker image prune`
* Update images:
* All images:
### Via Watchtower auto-updater (especially useful if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one run:
```
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once nginx
```
```bash
docker-compose pull
```
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.
* Single image:
```bash
docker-compose pull nginx
```
* Update containers:
* All containers:
```bash
docker-compose up -d
```
* Single container:
```bash
docker-compose up -d nginx
```
* You can also remove the old dangling images:
```bash
docker image prune
```
### Via Docker Run
* Update the image:
```bash
docker pull lscr.io/linuxserver/nginx:latest
```
* Stop the running container:
```bash
docker stop nginx
```
* Delete the container:
```bash
docker rm nginx
```
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* You can also remove the old dangling images:
```bash
docker image prune
```
### Image Update Notifications - Diun (Docker Image Update Notifier)
>[!TIP]
>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
* You can also remove the old dangling images: `docker image prune`
## Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:
```bash
```
git clone https://github.com/linuxserver/docker-nginx.git
cd docker-nginx
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/nginx:latest .
-t linuxserver/nginx:latest .
```
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
```bash
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
```
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Versions
* **13.07.25:** - Fixed auto-reload functionality.
* **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.
* **25.05.23:** - Rebase to Alpine 3.18, deprecate armhf.
* **16.01.23:** - Remove nchan module because it keeps causing crashes.
* **22.12.22:** - Rebase to Alpine 3.17 with PHP 8.1, migrate to s6v3.
* **20.08.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)).
* **22.05.22:** - Install nginx version from 3.14.
* **01.07.21:** - Rebasing to alpine 3.14.
* **24.06.21:** - Update default nginx conf folder.
* **12.04.21:** - Add php7-gmp and php7-pecl-mailparse.
* **13.02.21:** - Remove php7-pecl-imagick (it now installs the full imagemagick with too much crud). Users can install it via [this docker mod](https://github.com/linuxserver/docker-mods/tree/swag-imagemagick).
* **09.02.21:** - Rebasing to alpine 3.13. Add nginx mods brotli and dav-ext. Remove nginx mods lua and lua-upstream (due to regression over the last couple of years).
* **08.09.20:** - Add php7-xsl.
* **01.06.20:** - Rebasing to alpine 3.12.
* **18.04.20:** - Fix unwanted shutdown of the container.
* **11.03.20:** - Add php7-sodium.
* **18.02.20:** - Add geoip2, suppress lua warning.
* **19.12.19:** - Rebasing to alpine 3.11.
* **18.12.19:** - Add php7-imap and php7-pecl-apcu.
* **13.11.19:** - Add php7-pdo_odbc.
* **24.10.19:** - Add php7-pecl-imagick.
* **06.08.19:** - Add php7-bcmath, ph7-pear, php7-xmlrpc and php7-ftp.

View File

@ -2,7 +2,7 @@
# jenkins variables
project_name: docker-nginx
external_type: alpine_repo
external_type: os
release_type: stable
release_tag: latest
ls_branch: master
@ -15,14 +15,12 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/nginx'
- PR_DOCKERHUB_IMAGE = 'lspipepr/nginx'
- DIST_IMAGE = 'alpine'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.22/main/'
- DIST_REPO_PACKAGES = 'nginx'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'
- CI_PORT='80'
- CI_SSL='false'
- CI_DELAY='60'
- CI_DOCKERENV=''
- CI_DELAY='120'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH=''
- CI_WEBPATH=''

View File

@ -1,188 +1,159 @@
NAME VERSION TYPE
acl-libs 2.3.2-r1 apk
alpine-baselayout 3.7.0-r0 apk
alpine-baselayout-data 3.7.0-r0 apk
alpine-keys 2.5-r0 apk
alpine-release 3.22.3-r0 apk
aom-libs 3.12.1-r0 apk
apache2-utils 2.4.66-r0 apk
apk-tools 2.14.9-r3 apk
apr 1.7.5-r0 apk
apr-util 1.6.3-r1 apk
argon2-libs 20190702-r5 apk
bash 5.2.37-r0 apk
brotli-libs 1.1.0-r2 apk
busybox 1.37.0-r20 apk
busybox-binsh 1.37.0-r20 apk
c-ares 1.34.6-r0 apk
c-client 2007f-r15 apk
ca-certificates 20250911-r0 apk
ca-certificates-bundle 20250911-r0 apk
catatonit 0.2.1-r0 apk
composer 2.9.5 binary
coreutils 9.7-r1 apk
coreutils-env 9.7-r1 apk
coreutils-fmt 9.7-r1 apk
coreutils-sha512sum 9.7-r1 apk
curl 8.14.1-r2 apk
findutils 4.10.0-r0 apk
fontconfig 2.15.0-r3 apk
freetype 2.13.3-r0 apk
gdbm 1.24-r0 apk
geoip 1.6.12-r6 apk
git 2.49.1-r0 apk
git-init-template 2.49.1-r0 apk
git-perl 2.49.1-r0 apk
gmp 6.3.0-r3 apk
icu-data-en 76.1-r1 apk
icu-libs 76.1-r1 apk
inotify-tools 4.23.9.0-r0 apk
inotify-tools-libs 4.23.9.0-r0 apk
jq 1.8.1-r0 apk
libapk2 2.14.9-r3 apk
libattr 2.5.2-r2 apk
libavif 1.3.0-r0 apk
libbsd 0.12.2-r0 apk
libbz2 1.0.8-r6 apk
libcrypto3 3.5.5-r0 apk
libcurl 8.14.1-r2 apk
libdav1d 1.5.1-r0 apk
libedit 20250104.3.1-r1 apk
libevent 2.1.12-r8 apk
libexpat 2.7.4-r0 apk
libgcc 14.2.0-r6 apk
libgd 2.3.3-r10 apk
libice 1.1.2-r0 apk
libidn2 2.3.7-r0 apk
libintl 0.24.1-r0 apk
libjpeg-turbo 3.1.0-r0 apk
libldap 2.6.8-r0 apk
libmaxminddb-libs 1.9.1-r0 apk
libmd 1.1.0-r0 apk
libmemcached-libs 1.1.4-r1 apk
libncursesw 6.5_p20250503-r0 apk
libpng 1.6.54-r0 apk
libpq 17.8-r0 apk
libproc2 4.0.4-r3 apk
libpsl 0.21.5-r3 apk
libsasl 2.1.28-r8 apk
libseccomp 2.6.0-r0 apk
libsharpyuv 1.5.0-r0 apk
libsm 1.2.5-r0 apk
libsodium 1.0.20-r1 apk
libssl3 3.5.5-r0 apk
libstdc++ 14.2.0-r6 apk
libunistring 1.3-r0 apk
libuuid 2.41-r9 apk
libwebp 1.5.0-r0 apk
libx11 1.8.11-r0 apk
libxau 1.0.12-r0 apk
libxcb 1.17.0-r0 apk
libxdmcp 1.1.5-r1 apk
libxext 1.3.6-r2 apk
libxml2 2.13.9-r0 apk
libxpm 3.5.17-r0 apk
libxslt 1.1.43-r3 apk
libxt 1.3.1-r0 apk
libyuv 0.0.1887.20251502-r1 apk
libzip 1.11.4-r0 apk
linux-pam 1.7.0-r4 apk
logrotate 3.21.0-r1 apk
lz4-libs 1.10.0-r0 apk
memcached 1.6.32-r0 apk
musl 1.2.5-r10 apk
musl-utils 1.2.5-r10 apk
nano 8.4-r0 apk
ncurses-terminfo-base 6.5_p20250503-r0 apk
netcat-openbsd 1.229.1-r0 apk
nghttp2-libs 1.65.0-r0 apk
nginx 1.28.2-r0 apk
nginx-mod-devel-kit 1.28.2-r0 apk
nginx-mod-http-brotli 1.28.2-r0 apk
nginx-mod-http-dav-ext 1.28.2-r0 apk
nginx-mod-http-echo 1.28.2-r0 apk
nginx-mod-http-fancyindex 1.28.2-r0 apk
nginx-mod-http-geoip 1.28.2-r0 apk
nginx-mod-http-geoip2 1.28.2-r0 apk
nginx-mod-http-headers-more 1.28.2-r0 apk
nginx-mod-http-image-filter 1.28.2-r0 apk
nginx-mod-http-perl 1.28.2-r0 apk
nginx-mod-http-redis2 1.28.2-r0 apk
nginx-mod-http-set-misc 1.28.2-r0 apk
nginx-mod-http-upload-progress 1.28.2-r0 apk
nginx-mod-http-xslt-filter 1.28.2-r0 apk
nginx-mod-mail 1.28.2-r0 apk
nginx-mod-rtmp 1.28.2-r0 apk
nginx-mod-stream 1.28.2-r0 apk
nginx-mod-stream-geoip 1.28.2-r0 apk
nginx-mod-stream-geoip2 1.28.2-r0 apk
nginx-vim 1.28.2-r0 apk
oniguruma 6.9.10-r0 apk
openssl 3.5.5-r0 apk
pcre2 10.46-r0 apk
perl 5.40.3-r0 apk
perl-error 0.17030-r0 apk
perl-git 2.49.1-r0 apk
php84 8.4.16-r0 apk
php84-bcmath 8.4.16-r0 apk
php84-bz2 8.4.16-r0 apk
php84-common 8.4.16-r0 apk
php84-ctype 8.4.16-r0 apk
php84-curl 8.4.16-r0 apk
php84-dom 8.4.16-r0 apk
php84-exif 8.4.16-r0 apk
php84-fileinfo 8.4.16-r0 apk
php84-fpm 8.4.16-r0 apk
php84-ftp 8.4.16-r0 apk
php84-gd 8.4.16-r0 apk
php84-gmp 8.4.16-r0 apk
php84-iconv 8.4.16-r0 apk
php84-intl 8.4.16-r0 apk
php84-ldap 8.4.16-r0 apk
php84-mbstring 8.4.16-r0 apk
php84-mysqli 8.4.16-r0 apk
php84-mysqlnd 8.4.16-r0 apk
php84-opcache 8.4.16-r0 apk
php84-openssl 8.4.16-r0 apk
php84-pdo 8.4.16-r0 apk
php84-pdo_mysql 8.4.16-r0 apk
php84-pdo_odbc 8.4.16-r0 apk
php84-pdo_pgsql 8.4.16-r0 apk
php84-pdo_sqlite 8.4.16-r0 apk
php84-pear 8.4.16-r0 apk
php84-pecl-apcu 5.1.27-r0 apk
php84-pecl-igbinary 3.2.16-r1 apk
php84-pecl-imap 1.0.3-r0 apk
php84-pecl-memcached 3.3.0-r0 apk
php84-pecl-msgpack 3.0.0-r0 apk
php84-pecl-redis 6.3.0-r0 apk
php84-pgsql 8.4.16-r0 apk
php84-phar 8.4.16-r0 apk
php84-posix 8.4.16-r0 apk
php84-session 8.4.16-r0 apk
php84-simplexml 8.4.16-r0 apk
php84-soap 8.4.16-r0 apk
php84-sockets 8.4.16-r0 apk
php84-sodium 8.4.16-r0 apk
php84-sqlite3 8.4.16-r0 apk
php84-tokenizer 8.4.16-r0 apk
php84-xml 8.4.16-r0 apk
php84-xmlreader 8.4.16-r0 apk
php84-xmlwriter 8.4.16-r0 apk
php84-xsl 8.4.16-r0 apk
php84-zip 8.4.16-r0 apk
popt 1.19-r4 apk
procps-ng 4.0.4-r3 apk
readline 8.2.13-r1 apk
scanelf 1.3.8-r1 apk
shadow 4.17.3-r0 apk
skalibs-libs 2.14.4.0-r0 apk
sqlite-libs 3.49.2-r1 apk
ssl_client 1.37.0-r20 apk
tiff 4.7.1-r0 apk
tzdata 2025c-r0 apk
unixodbc 2.3.12-r0 apk
utmps-libs 0.1.3.1-r0 apk
xz-libs 5.8.1-r0 apk
zlib 1.3.1-r2 apk
zstd-libs 1.5.7-r0 apk
alpine-baselayout-3.1.2-r0
alpine-keys-2.1-r2
apache2-utils-2.4.41-r0
apk-tools-2.10.4-r2
apr-1.6.5-r0
apr-util-1.6.1-r6
argon2-libs-20171227-r2
bash-5.0.0-r0
busybox-1.30.1-r3
ca-certificates-20190108-r0
ca-certificates-cacert-20190108-r0
coreutils-8.31-r0
curl-7.66.0-r0
db-5.3.28-r1
expat-2.2.8-r0
fontconfig-2.13.1-r0
freetype-2.10.0-r0
geoip-1.6.12-r1
git-2.22.0-r0
git-perl-2.22.0-r0
icu-libs-64.2-r0
imagemagick-libs-7.0.8.58-r0
lcms2-2.9-r1
libacl-2.2.52-r6
libattr-2.4.48-r0
libbsd-0.9.1-r0
libbz2-1.0.6-r7
libc-utils-0.7.1-r0
libcrypto1.1-1.1.1d-r0
libcurl-7.66.0-r0
libedit-20190324.3.1-r0
libevent-2.1.10-r0
libgcc-8.3.0-r0
libgcrypt-1.8.5-r0
libgd-2.2.5-r2
libgpg-error-1.36-r2
libice-1.0.9-r3
libjpeg-turbo-2.0.3-r0
libldap-2.4.48-r0
libltdl-2.4.6-r6
libmagic-5.37-r1
libmcrypt-2.5.8-r7
libmemcached-libs-1.0.18-r3
libpng-1.6.37-r1
libpq-11.6-r0
libressl2.7-libcrypto-2.7.5-r0
libressl2.7-libssl-2.7.5-r0
libsasl-2.1.27-r3
libseccomp-2.4.1-r0
libsm-1.2.3-r0
libssl1.1-1.1.1d-r0
libstdc++-8.3.0-r0
libtls-standalone-2.9.1-r0
libuuid-2.33.2-r0
libwebp-1.0.2-r0
libx11-1.6.8-r1
libxau-1.0.9-r0
libxcb-1.13.1-r0
libxdmcp-1.1.3-r0
libxext-1.3.4-r0
libxml2-2.9.9-r2
libxpm-3.5.12-r0
libxslt-1.1.33-r2
libxt-1.1.5-r2
libzip-1.5.2-r0
linux-pam-1.3.0-r1
logrotate-3.15.0-r0
luajit-2.1.0_beta3-r4
memcached-1.5.16-r0
musl-1.1.22-r3
musl-utils-1.1.22-r3
nano-4.3-r0
ncurses-libs-6.1_p20190518-r0
ncurses-terminfo-6.1_p20190518-r0
ncurses-terminfo-base-6.1_p20190518-r0
nghttp2-libs-1.39.2-r0
nginx-1.16.1-r1
nginx-mod-devel-kit-1.16.1-r1
nginx-mod-http-echo-1.16.1-r1
nginx-mod-http-fancyindex-1.16.1-r1
nginx-mod-http-geoip-1.16.1-r1
nginx-mod-http-headers-more-1.16.1-r1
nginx-mod-http-image-filter-1.16.1-r1
nginx-mod-http-lua-1.16.1-r1
nginx-mod-http-lua-upstream-1.16.1-r1
nginx-mod-http-nchan-1.16.1-r1
nginx-mod-http-perl-1.16.1-r1
nginx-mod-http-redis2-1.16.1-r1
nginx-mod-http-set-misc-1.16.1-r1
nginx-mod-http-upload-progress-1.16.1-r1
nginx-mod-http-xslt-filter-1.16.1-r1
nginx-mod-mail-1.16.1-r1
nginx-mod-rtmp-1.16.1-r1
nginx-mod-stream-1.16.1-r1
nginx-mod-stream-geoip-1.16.1-r1
nginx-vim-1.16.1-r1
openssl-1.1.1d-r0
pcre-8.43-r0
pcre2-10.33-r0
perl-5.28.2-r1
perl-error-0.17027-r0
perl-git-2.22.0-r0
php7-7.3.11-r0
php7-bcmath-7.3.11-r0
php7-bz2-7.3.11-r0
php7-common-7.3.11-r0
php7-ctype-7.3.11-r0
php7-curl-7.3.11-r0
php7-dom-7.3.11-r0
php7-exif-7.3.11-r0
php7-fileinfo-7.3.11-r0
php7-fpm-7.3.11-r0
php7-ftp-7.3.11-r0
php7-gd-7.3.11-r0
php7-iconv-7.3.11-r0
php7-intl-7.3.11-r0
php7-json-7.3.11-r0
php7-ldap-7.3.11-r0
php7-mbstring-7.3.11-r0
php7-mysqli-7.3.11-r0
php7-mysqlnd-7.3.11-r0
php7-opcache-7.3.11-r0
php7-openssl-7.3.11-r0
php7-pdo-7.3.11-r0
php7-pdo_mysql-7.3.11-r0
php7-pdo_odbc-7.3.11-r0
php7-pdo_pgsql-7.3.11-r0
php7-pdo_sqlite-7.3.11-r0
php7-pear-7.3.11-r0
php7-pecl-igbinary-3.0.1-r1
php7-pecl-imagick-3.4.4-r1
php7-pecl-mcrypt-1.0.2-r1
php7-pecl-memcached-3.1.3-r2
php7-pecl-redis-4.3.0-r2
php7-pgsql-7.3.11-r0
php7-phar-7.3.11-r0
php7-posix-7.3.11-r0
php7-session-7.3.11-r0
php7-simplexml-7.3.11-r0
php7-soap-7.3.11-r0
php7-sockets-7.3.11-r0
php7-sqlite3-7.3.11-r0
php7-tokenizer-7.3.11-r0
php7-xml-7.3.11-r0
php7-xmlreader-7.3.11-r0
php7-xmlrpc-7.3.11-r0
php7-xmlwriter-7.3.11-r0
php7-zip-7.3.11-r0
popt-1.16-r7
readline-8.0.0-r0
scanelf-1.2.3-r0
shadow-4.6-r2
sqlite-libs-3.28.0-r1
ssl_client-1.30.1-r3
tzdata-2019c-r0
unixodbc-2.3.7-r1
xz-5.2.4-r0
xz-libs-5.2.4-r0
zlib-1.2.11-r1

View File

@ -6,137 +6,68 @@ project_url: "https://nginx.org/"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png"
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a simple webserver with php support. The config files reside in `/config` for easy user customization."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
project_categories: "Reverse Proxy"
# supported architectures
available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files"}
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Contains your www content and all relevant configuration files." }
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
- { external_port: "80", internal_port: "80", port_desc: "http" }
- { external_port: "443", internal_port: "443", port_desc: "https" }
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
# optional parameters
optional_block_1: false
optional_block_1_items: ""
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Add your web files to `/config/www` for hosting.
Modify the nginx, php and site config files under `/config` as needed
# init diagram
init_diagram: |
"nginx:latest": {
docker-mods
base {
fix-attr +\nlegacy cont-init
}
docker-mods -> base
legacy-services
custom services
init-services -> legacy-services
init-services -> custom services
custom services -> legacy-services
legacy-services -> ci-service-check
init-migrations -> init-adduser
init-nginx-end -> init-config
init-os-end -> init-config
init-config -> init-config-end
init-crontab-config -> init-config-end
init-config -> init-crontab-config
init-mods-end -> init-custom-files
init-adduser -> init-device-perms
base -> init-envfile
init-os-end -> init-folders
init-php -> init-keygen
base -> init-migrations
init-config-end -> init-mods
init-mods-package-install -> init-mods-end
init-mods -> init-mods-package-install
init-samples -> init-nginx
init-version-checks -> init-nginx-end
init-adduser -> init-os-end
init-device-perms -> init-os-end
init-envfile -> init-os-end
init-keygen -> init-permissions
init-nginx -> init-php
init-folders -> init-samples
init-custom-files -> init-services
init-permissions -> init-version-checks
init-services -> svc-cron
svc-cron -> legacy-services
init-services -> svc-nginx
svc-nginx -> legacy-services
init-services -> svc-nginx-auto-reload
svc-nginx-auto-reload -> legacy-services
init-services -> svc-php-fpm
svc-php-fpm -> legacy-services
}
Base Images: {
"baseimage-alpine-nginx:3.22" <- "baseimage-alpine:3.22"
}
"nginx:latest" <- Base Images
Add your web files to `/config/www` for hosting.
Modify the nginx, php and site config files under `/config` as needed
*Protip: This container is best combined with a sql server, e.g. [mariadb](https://hub.docker.com/r/linuxserver/mariadb/)*
# changelog
changelogs:
- {date: "13.07.25:", desc: "Fixed auto-reload functionality."}
- {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."}
- {date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf."}
- {date: "16.01.23:", desc: "Remove nchan module because it keeps causing crashes."}
- {date: "22.12.22:", desc: "Rebase to Alpine 3.17 with PHP 8.1, migrate to s6v3."}
- {date: "20.08.22:", desc: "Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))."}
- {date: "22.05.22:", desc: "Install nginx version from 3.14."}
- {date: "01.07.21:", desc: "Rebasing to alpine 3.14."}
- {date: "24.06.21:", desc: "Update default nginx conf folder."}
- {date: "12.04.21:", desc: "Add php7-gmp and php7-pecl-mailparse."}
- {date: "13.02.21:", desc: "Remove php7-pecl-imagick (it now installs the full imagemagick with too much crud). Users can install it via [this docker mod](https://github.com/linuxserver/docker-mods/tree/swag-imagemagick)."}
- {date: "09.02.21:", desc: "Rebasing to alpine 3.13. Add nginx mods brotli and dav-ext. Remove nginx mods lua and lua-upstream (due to regression over the last couple of years)."}
- {date: "08.09.20:", desc: "Add php7-xsl."}
- {date: "01.06.20:", desc: "Rebasing to alpine 3.12."}
- {date: "18.04.20:", desc: "Fix unwanted shutdown of the container."}
- {date: "11.03.20:", desc: "Add php7-sodium."}
- {date: "18.02.20:", desc: "Add geoip2, suppress lua warning."}
- {date: "19.12.19:", desc: "Rebasing to alpine 3.11."}
- {date: "18.12.19:", desc: "Add php7-imap and php7-pecl-apcu."}
- {date: "13.11.19:", desc: "Add php7-pdo_odbc."}
- {date: "24.10.19:", desc: "Add php7-pecl-imagick."}
- {date: "06.08.19:", desc: "Add php7-bcmath, ph7-pear, php7-xmlrpc and php7-ftp."}
- {date: "02.08.19:", desc: "Add php7-ldap."}
- {date: "28.06.19:", desc: "Rebasing to alpine 3.10."}
- {date: "08.05.19:", desc: "Remove default.conf when nginx is upgraded in downstream image."}
- {date: "30.04.19:", desc: "Add php-redis."}
- {date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag."}
- {date: "02.03.19:", desc: "Add php intl and posix modules."}
- {date: "28.02.19:", desc: "Add php7-opcache, remove memcached service due to issues on aarch64 (let us know if you need to enable it)."}
- {date: "22.02.19:", desc: "Rebasing to alpine 3.9."}
- {date: "18.11.18:", desc: "Attempt to upgrade packages during build."}
- {date: "28.09.18:", desc: "Multi-arch image."}
- {date: "17.08.18:", desc: "Rebase to alpine 3.8, inherit nginx.conf from nginx baseimage."}
- {date: "11.05.18:", desc: "Add php pgsql support."}
- {date: "19.04.18:", desc: "Bind memcached to localhost only, add php7-sqlite3."}
- {date: "05.01.18:", desc: "Rebase to alpine 3.7."}
- {date: "08.11.17:", desc: "Add php7 soap module."}
- {date: "31.10.17:", desc: "Add php7 exif and xmlreader modules."}
- {date: "30.09.17:", desc: "Copy additional root files into image."}
- {date: "24.09.17:", desc: "Add memcached service."}
- {date: "31.08.17:", desc: "Add php7-phar."}
- {date: "14.07.17:", desc: "Enable modules dynamically in nginx.conf."}
- {date: "22.06.17:", desc: "Add various nginx modules and enable all modules in the default nginx.conf."}
- {date: "05.06.17:", desc: "Add php7-bz2."}
- {date: "25.05.17:", desc: "Rebase to alpine 3.6."}
- {date: "18.04.17:", desc: "Add php7-sockets."}
- {date: "27.02.17:", desc: "Rebase to alpine 3.5, update to nginx 1.10.2 and php7."}
- {date: "14.10.16:", desc: "Add version layer information."}
- {date: "10.09.16:", desc: "Add badges to README."}
- {date: "05.12.15:", desc: "Intial Release."}
- { date: "13.11.19:", desc: "Add php7-pdo_odbc." }
- { date: "24.10.19:", desc: "Add php7-pecl-imagick." }
- { date: "06.08.19:", desc: "Add php7-bcmath, ph7-pear, php7-xmlrpc and php7-ftp." }
- { date: "02.08.19:", desc: "Add php7-ldap." }
- { date: "28.06.19:", desc: "Rebasing to alpine 3.10." }
- { date: "08.05.19:", desc: "Remove default.conf when nginx is upgraded in downstream image." }
- { date: "30.04.19:", desc: "Add php-redis." }
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
- { date: "02.03.19:", desc: "Add php intl and posix modules." }
- { date: "28.02.19:", desc: "Add php7-opcache, remove memcached service due to issues on aarch64 (let us know if you need to enable it)." }
- { date: "22.02.19:", desc: "Rebasing to alpine 3.9." }
- { date: "18.11.18:", desc: "Attempt to upgrade packages during build." }
- { date: "28.09.18:", desc: "Multi-arch image." }
- { date: "17.08.18:", desc: "Rebase to alpine 3.8, inherit nginx.conf from nginx baseimage." }
- { date: "11.05.18:", desc: "Add php pgsql support." }
- { date: "19.04.18:", desc: "Bind memcached to localhost only, add php7-sqlite3." }
- { date: "05.01.18:", desc: "Rebase to alpine 3.7." }
- { date: "08.11.17:", desc: "Add php7 soap module." }
- { date: "31.10.17:", desc: "Add php7 exif and xmlreader modules." }
- { date: "30.09.17:", desc: "Copy additional root files into image." }
- { date: "24.09.17:", desc: "Add memcached service." }
- { date: "31.08.17:", desc: "Add php7-phar." }
- { date: "14.07.17:", desc: "Enable modules dynamically in nginx.conf." }
- { date: "22.06.17:", desc: "Add various nginx modules and enable all modules in the default nginx.conf." }
- { date: "05.06.17:", desc: "Add php7-bz2." }
- { date: "25.05.17:", desc: "Rebase to alpine 3.6." }
- { date: "18.04.17:", desc: "Add php7-sockets." }
- { date: "27.02.17:", desc: "Rebase to alpine 3.5, update to nginx 1.10.2 and php7." }
- { date: "14.10.16:", desc: "Add version layer information." }
- { date: "10.09.16:", desc: "Add badges to README." }
- { date: "05.12.15:", desc: "Intial Release." }

View File

@ -1,42 +0,0 @@
#!/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

View File

@ -1 +0,0 @@
longrun