Skip to content

Commit d376c95

Browse files
authored
Merge pull request #526 from linuxserver/3.21
2 parents 9a63c22 + 29bd5fe commit d376c95

File tree

15 files changed

+83
-67
lines changed

15 files changed

+83
-67
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.20
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.21
44

55
# set version label
66
ARG BUILD_DATE
@@ -88,7 +88,7 @@ RUN \
8888
pip install -U --no-cache-dir \
8989
pip \
9090
wheel && \
91-
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
91+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \
9292
certbot==${CERTBOT_VERSION} \
9393
certbot-dns-acmedns \
9494
certbot-dns-aliyun \
@@ -150,9 +150,9 @@ RUN \
150150
rm -f /etc/nginx/conf.d/stream.conf && \
151151
echo "**** correct ip6tables legacy issue ****" && \
152152
rm \
153-
/sbin/ip6tables && \
153+
/usr/sbin/ip6tables && \
154154
ln -s \
155-
/sbin/ip6tables-nft /sbin/ip6tables && \
155+
/usr/sbin/ip6tables-nft /usr/sbin/ip6tables && \
156156
echo "**** remove unnecessary fail2ban filters ****" && \
157157
rm \
158158
/etc/fail2ban/jail.d/alpine-ssh.conf && \

Dockerfile.aarch64

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.20
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.21
44

55
# set version label
66
ARG BUILD_DATE
@@ -88,7 +88,7 @@ RUN \
8888
pip install -U --no-cache-dir \
8989
pip \
9090
wheel && \
91-
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
91+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \
9292
certbot==${CERTBOT_VERSION} \
9393
certbot-dns-acmedns \
9494
certbot-dns-aliyun \
@@ -150,9 +150,9 @@ RUN \
150150
rm -f /etc/nginx/conf.d/stream.conf && \
151151
echo "**** correct ip6tables legacy issue ****" && \
152152
rm \
153-
/sbin/ip6tables && \
153+
/usr/sbin/ip6tables && \
154154
ln -s \
155-
/sbin/ip6tables-nft /sbin/ip6tables && \
155+
/usr/sbin/ip6tables-nft /usr/sbin/ip6tables && \
156156
echo "**** remove unnecessary fail2ban filters ****" && \
157157
rm \
158158
/etc/fail2ban/jail.d/alpine-ssh.conf && \

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ This will *ask* Google et al not to index and list your site. Be careful with th
149149

150150
Please follow the instructions [on this blog post](https://www.linuxserver.io/blog/2020-08-21-introducing-swag#migrate).
151151

152+
## Read-Only Operation
153+
154+
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
155+
156+
### Caveats
157+
158+
* `/tmp` must be mounted to tmpfs
159+
* fail2ban will not be available
160+
152161
## Usage
153162

154163
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
@@ -180,6 +189,7 @@ services:
180189
- ONLY_SUBDOMAINS=false #optional
181190
- EXTRA_DOMAINS= #optional
182191
- STAGING=false #optional
192+
- DISABLE_F2B= #optional
183193
volumes:
184194
- /path/to/swag/config:/config
185195
ports:
@@ -207,6 +217,7 @@ docker run -d \
207217
-e ONLY_SUBDOMAINS=false `#optional` \
208218
-e EXTRA_DOMAINS= `#optional` \
209219
-e STAGING=false `#optional` \
220+
-e DISABLE_F2B= `#optional` \
210221
-p 443:443 \
211222
-p 80:80 `#optional` \
212223
-v /path/to/swag/config:/config \
@@ -235,7 +246,9 @@ Containers are configured using parameters passed at runtime (such as those abov
235246
| `-e ONLY_SUBDOMAINS=false` | If you wish to get certs only for certain subdomains, but not the main domain (main domain may be hosted on another machine and cannot be validated), set this to `true` |
236247
| `-e EXTRA_DOMAINS=` | Additional fully qualified domain names (comma separated, no spaces) ie. `example.net,subdomain.example.net,*.example.org` |
237248
| `-e STAGING=false` | Set to `true` to retrieve certs in staging mode. Rate limits will be much higher, but the resulting cert will not pass the browser's security test. Only to be used for testing purposes. |
249+
| `-e DISABLE_F2B=` | Set to `true` to disable the Fail2ban service in the container, if you're already running it elsewhere or using a different IPS. |
238250
| `-v /config` | Persistent config files |
251+
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
239252
| `--cap-add=NET_ADMIN` | Required for fail2Ban to be able to modify iptables rules. |
240253

241254
### Portainer notice
@@ -404,6 +417,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
404417

405418
## Versions
406419

420+
* **17.12.24:** - Rebase to Alpine 3.21.
407421
* **21.10.24:** - Fix naming issue with Dynu plugin. If you are using Dynu, please make sure your credentials are set in /config/dns-conf/dynu.ini and your DNSPLUGIN variable is set to dynu (not dynudns).
408422
* **30.08.24:** - Fix zerossl cert revocation.
409423
* **24.07.14:** - Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings.

readme-vars.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ opt_param_env_vars:
3737
- {env_var: "ONLY_SUBDOMAINS", env_value: "false", desc: "If you wish to get certs only for certain subdomains, but not the main domain (main domain may be hosted on another machine and cannot be validated), set this to `true`"}
3838
- {env_var: "EXTRA_DOMAINS", env_value: "", desc: "Additional fully qualified domain names (comma separated, no spaces) ie. `example.net,subdomain.example.net,*.example.org`"}
3939
- {env_var: "STAGING", env_value: "false", desc: "Set to `true` to retrieve certs in staging mode. Rate limits will be much higher, but the resulting cert will not pass the browser's security test. Only to be used for testing purposes."}
40+
- {env_var: "DISABLE_F2B", env_value: "", desc: "Set to `true` to disable the Fail2ban service in the container, if you're already running it elsewhere or using a different IPS."}
4041
opt_param_usage_include_ports: true
4142
opt_param_ports:
4243
- {external_port: "80", internal_port: "80", port_desc: "HTTP port (required for HTTP validation and HTTP -> HTTPS redirect)"}
44+
readonly_supported: true
45+
readonly_message: |
46+
* `/tmp` must be mounted to tmpfs
47+
* fail2ban will not be available
4348
# application setup block
4449
app_setup_block_enabled: true
4550
app_setup_block: |
@@ -200,6 +205,7 @@ init_diagram: |
200205
"swag:latest" <- Base Images
201206
# changelog
202207
changelogs:
208+
- {date: "17.12.24:", desc: "Rebase to Alpine 3.21."}
203209
- {date: "21.10.24:", desc: "Fix naming issue with Dynu plugin. If you are using Dynu, please make sure your credentials are set in /config/dns-conf/dynu.ini and your DNSPLUGIN variable is set to dynu (not dynudns)."}
204210
- {date: "30.08.24:", desc: "Fix zerossl cert revocation."}
205211
- {date: "24.07.14:", desc: "Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings."}

root/app/le-renew.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ echo
66
echo "<------------------------------------------------->"
77
echo "cronjob running on $(date)"
88
echo "Running certbot renew"
9-
certbot renew --non-interactive
9+
certbot renew --non-interactive --config-dir /config/etc/letsencrypt --logs-dir /config/log/letsencrypt --work-dir /tmp/letsencrypt --config /config/etc/letsencrypt/cli.ini

root/defaults/etc/letsencrypt/renewal-hooks/deploy/10-default

100644100755
File mode changed.

root/defaults/etc/letsencrypt/renewal-hooks/post/10-nginx

100644100755
File mode changed.

root/defaults/etc/letsencrypt/renewal-hooks/pre/10-nginx

100644100755
File mode changed.

root/defaults/nginx/site-confs/default.conf.sample

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2024/07/16 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample
1+
## Version 2024/12/17 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample
22

33
# redirect all traffic to https
44
server {
@@ -80,5 +80,3 @@ server {
8080

8181
# enable subdomain method reverse proxy confs
8282
include /config/nginx/proxy-confs/*.subdomain.conf;
83-
# enable proxy cache for auth
84-
proxy_cache_path cache/ keys_zone=auth_cache:10m;

root/etc/crontabs/root

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
0 3 * * 6 run-parts /etc/periodic/weekly
66
0 5 1 * * run-parts /etc/periodic/monthly
77

8-
8 2 * * * /app/le-renew.sh >> /config/log/letsencrypt/letsencrypt.log 2>&1
8+
8 2 * * * /app/le-renew.sh >> /config/log/letsencrypt/renewal.log 2>&1

0 commit comments

Comments
 (0)