Skip to content

Commit 7a60eef

Browse files
authoredDec 7, 2024··
Merge pull request #17 from linuxserver/3.21
2 parents eb82c4c + 1b0c6cb commit 7a60eef

13 files changed

+134
-120
lines changed
 

‎.github/workflows/external_trigger.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
2424
echo "> External trigger running off of main branch. To disable this trigger, add \`socket-proxy_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
2525
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
26-
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
26+
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
2727
&& awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
2828
echo "Type is \`alpine_repo\`" >> $GITHUB_STEP_SUMMARY
2929
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
@@ -44,16 +44,18 @@ jobs:
4444
token=$(curl -sX GET \
4545
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fsocket-proxy%3Apull" \
4646
| jq -r '.token')
47-
multidigest=$(curl -s \
48-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
49-
--header "Authorization: Bearer ${token}" \
50-
"https://ghcr.io/v2/${image}/manifests/${tag}" \
51-
| jq -r 'first(.manifests[].digest)')
52-
digest=$(curl -s \
53-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
54-
--header "Authorization: Bearer ${token}" \
55-
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
56-
| jq -r '.config.digest')
47+
multidigest=$(curl -s \
48+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
49+
--header "Accept: application/vnd.oci.image.index.v1+json" \
50+
--header "Authorization: Bearer ${token}" \
51+
"https://ghcr.io/v2/${image}/manifests/${tag}")
52+
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
53+
digest=$(curl -s \
54+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
55+
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
56+
--header "Authorization: Bearer ${token}" \
57+
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
58+
| jq -r '.config.digest')
5759
image_info=$(curl -sL \
5860
--header "Authorization: Bearer ${token}" \
5961
"https://ghcr.io/v2/${image}/blobs/${digest}")
@@ -77,7 +79,7 @@ jobs:
7779
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
7880
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
7981
exit 0
80-
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
82+
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
8183
echo "New version \`${EXT_RELEASE}\` found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY
8284
FAILURE_REASON="New version ${EXT_RELEASE} for socket-proxy tag latest is detected, however not all arch repos are updated yet. Will try again later."
8385
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,

‎Dockerfile

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

3-
FROM docker.io/alpine:3.20
3+
FROM docker.io/alpine:3.21
44

55
# set version label
66
ARG BUILD_DATE
@@ -18,7 +18,7 @@ RUN \
1818
curl \
1919
envsubst && \
2020
if [ -z ${NGINX_VERSION+x} ]; then \
21-
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
21+
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
2222
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
2323
fi && \
2424
apk add --no-cache \

‎Dockerfile.aarch64

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

3-
FROM docker.io/alpine:3.20
3+
FROM docker.io/alpine:3.21
44

55
# set version label
66
ARG BUILD_DATE
@@ -18,7 +18,7 @@ RUN \
1818
curl \
1919
envsubst && \
2020
if [ -z ${NGINX_VERSION+x} ]; then \
21-
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
21+
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
2222
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
2323
fi && \
2424
apk add --no-cache \

‎Jenkinsfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ pipeline {
2727
DEV_DOCKERHUB_IMAGE = 'lsiodev/socket-proxy'
2828
PR_DOCKERHUB_IMAGE = 'lspipepr/socket-proxy'
2929
DIST_IMAGE = 'alpine'
30-
DIST_TAG = '3.20'
31-
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.20/main/'
30+
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.21/main/'
3231
DIST_REPO_PACKAGES = 'nginx'
3332
MULTIARCH='true'
3433
CI='true'
@@ -516,7 +515,7 @@ pipeline {
516515
--label \"org.opencontainers.image.title=Socket-proxy\" \
517516
--label \"org.opencontainers.image.description=socket-proxy image by linuxserver.io\" \
518517
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
519-
--provenance=false --sbom=false --builder=container --load \
518+
--provenance=true --sbom=true --builder=container --load \
520519
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
521520
sh '''#! /bin/bash
522521
set -e
@@ -580,7 +579,7 @@ pipeline {
580579
--label \"org.opencontainers.image.title=Socket-proxy\" \
581580
--label \"org.opencontainers.image.description=socket-proxy image by linuxserver.io\" \
582581
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
583-
--provenance=false --sbom=false --builder=container --load \
582+
--provenance=true --sbom=true --builder=container --load \
584583
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
585584
sh '''#! /bin/bash
586585
set -e
@@ -637,7 +636,7 @@ pipeline {
637636
--label \"org.opencontainers.image.title=Socket-proxy\" \
638637
--label \"org.opencontainers.image.description=socket-proxy image by linuxserver.io\" \
639638
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
640-
--provenance=false --sbom=false --builder=container --load \
639+
--provenance=true --sbom=true --builder=container --load \
641640
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
642641
sh '''#! /bin/bash
643642
set -e

‎README.md

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ This image can be run with a read-only container filesystem. For details please
6969

7070
To help you get started creating a container from this image you can either use docker compose or the docker cli.
7171

72+
>[!NOTE]
73+
>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
74+
7275
### docker compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
7376

7477
```yaml
@@ -193,27 +196,27 @@ Containers are configured using parameters passed at runtime (such as those abov
193196

194197
* Shell access whilst the container is running:
195198

196-
```bash
197-
docker exec -it socket-proxy /bin/sh
198-
```
199+
```bash
200+
docker exec -it socket-proxy /bin/sh
201+
```
199202

200203
* To monitor the logs of the container in realtime:
201204

202-
```bash
203-
docker logs -f socket-proxy
204-
```
205+
```bash
206+
docker logs -f socket-proxy
207+
```
205208

206209
* Container version number:
207210

208-
```bash
209-
docker inspect -f '{{ index .Config.Labels "build_version" }}' socket-proxy
210-
```
211+
```bash
212+
docker inspect -f '{{ index .Config.Labels "build_version" }}' socket-proxy
213+
```
211214

212215
* Image version number:
213216

214-
```bash
215-
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/socket-proxy:latest
216-
```
217+
```bash
218+
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/socket-proxy:latest
219+
```
217220

218221
## Updating Info
219222

@@ -224,66 +227,67 @@ Below are the instructions for updating containers:
224227
### Via Docker Compose
225228

226229
* Update images:
227-
* All images:
230+
* All images:
228231

229-
```bash
230-
docker compose pull
231-
```
232+
```bash
233+
docker compose pull
234+
```
232235

233-
* Single image:
236+
* Single image:
234237

235-
```bash
236-
docker compose pull socket-proxy
237-
```
238+
```bash
239+
docker compose pull socket-proxy
240+
```
238241

239242
* Update containers:
240-
* All containers:
243+
* All containers:
241244

242-
```bash
243-
docker compose up -d
244-
```
245+
```bash
246+
docker compose up -d
247+
```
245248

246-
* Single container:
249+
* Single container:
247250

248-
```bash
249-
docker compose up -d socket-proxy
250-
```
251+
```bash
252+
docker compose up -d socket-proxy
253+
```
251254

252255
* You can also remove the old dangling images:
253256

254-
```bash
255-
docker image prune
256-
```
257+
```bash
258+
docker image prune
259+
```
257260

258261
### Via Docker Run
259262

260263
* Update the image:
261264

262-
```bash
263-
docker pull lscr.io/linuxserver/socket-proxy:latest
264-
```
265+
```bash
266+
docker pull lscr.io/linuxserver/socket-proxy:latest
267+
```
265268

266269
* Stop the running container:
267270

268-
```bash
269-
docker stop socket-proxy
270-
```
271+
```bash
272+
docker stop socket-proxy
273+
```
271274

272275
* Delete the container:
273276

274-
```bash
275-
docker rm socket-proxy
276-
```
277+
```bash
278+
docker rm socket-proxy
279+
```
277280

278281
* You can also remove the old dangling images:
279282

280-
```bash
281-
docker image prune
282-
```
283+
```bash
284+
docker image prune
285+
```
283286

284287
### Image Update Notifications - Diun (Docker Image Update Notifier)
285288

286-
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
289+
>[!TIP]
290+
>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
287291
288292
## Building locally
289293

@@ -308,6 +312,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
308312

309313
## Versions
310314

315+
* **05.12.24:** - Rebase to Alpine 3.21.
311316
* **26.08.24:** - Change `ALLOW_START`, `ALLOW_STOP`, and `ALLOW_RESTARTS` to work even with `POST=0`.
312317
* **24.05.24:** - Rebase to Alpine 3.20.
313318
* **15.04.24:** - Allow disabling IPv6 support for legacy devices.

‎jenkins-vars.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ external_type: alpine_repo
66
release_type: stable
77
release_tag: latest
88
ls_branch: main
9+
image_sbom: true
10+
image_provenance: true
911
repo_vars:
1012
- BUILD_VERSION_ARG = 'NGINX_VERSION'
1113
- LS_USER = 'linuxserver'
@@ -15,8 +17,7 @@ repo_vars:
1517
- DEV_DOCKERHUB_IMAGE = 'lsiodev/socket-proxy'
1618
- PR_DOCKERHUB_IMAGE = 'lspipepr/socket-proxy'
1719
- DIST_IMAGE = 'alpine'
18-
- DIST_TAG = '3.20'
19-
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.20/main/'
20+
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.21/main/'
2021
- DIST_REPO_PACKAGES = 'nginx'
2122
- MULTIARCH='true'
2223
- CI='true'

‎readme-vars.yml

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ full_custom_readme: |
7373
7474
To help you get started creating a container from this image you can either use docker compose or the docker cli.
7575
76+
>[!NOTE]
77+
>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
78+
7679
### docker compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
7780
7881
```yaml
@@ -197,27 +200,27 @@ full_custom_readme: |
197200
198201
* Shell access whilst the container is running:
199202
200-
```bash
201-
docker exec -it socket-proxy /bin/sh
202-
```
203+
```bash
204+
docker exec -it socket-proxy /bin/sh
205+
```
203206
204207
* To monitor the logs of the container in realtime:
205208
206-
```bash
207-
docker logs -f socket-proxy
208-
```
209+
```bash
210+
docker logs -f socket-proxy
211+
```
209212
210213
* Container version number:
211214
212-
```bash
213-
docker inspect -f '{{ index .Config.Labels "build_version" }}' socket-proxy
214-
```
215+
```bash
216+
docker inspect -f '{{ index .Config.Labels "build_version" }}' socket-proxy
217+
```
215218
216219
* Image version number:
217220
218-
```bash
219-
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/socket-proxy:latest
220-
```
221+
```bash
222+
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/socket-proxy:latest
223+
```
221224
222225
## Updating Info
223226
@@ -228,66 +231,67 @@ full_custom_readme: |
228231
### Via Docker Compose
229232
230233
* Update images:
231-
* All images:
234+
* All images:
232235
233-
```bash
234-
docker compose pull
235-
```
236+
```bash
237+
docker compose pull
238+
```
236239
237-
* Single image:
240+
* Single image:
238241
239-
```bash
240-
docker compose pull socket-proxy
241-
```
242+
```bash
243+
docker compose pull socket-proxy
244+
```
242245
243246
* Update containers:
244-
* All containers:
247+
* All containers:
245248
246-
```bash
247-
docker compose up -d
248-
```
249+
```bash
250+
docker compose up -d
251+
```
249252
250-
* Single container:
253+
* Single container:
251254
252-
```bash
253-
docker compose up -d socket-proxy
254-
```
255+
```bash
256+
docker compose up -d socket-proxy
257+
```
255258
256259
* You can also remove the old dangling images:
257260
258-
```bash
259-
docker image prune
260-
```
261+
```bash
262+
docker image prune
263+
```
261264
262265
### Via Docker Run
263266
264267
* Update the image:
265268
266-
```bash
267-
docker pull lscr.io/linuxserver/socket-proxy:latest
268-
```
269+
```bash
270+
docker pull lscr.io/linuxserver/socket-proxy:latest
271+
```
269272
270273
* Stop the running container:
271274
272-
```bash
273-
docker stop socket-proxy
274-
```
275+
```bash
276+
docker stop socket-proxy
277+
```
275278
276279
* Delete the container:
277280
278-
```bash
279-
docker rm socket-proxy
280-
```
281+
```bash
282+
docker rm socket-proxy
283+
```
281284
282285
* You can also remove the old dangling images:
283286
284-
```bash
285-
docker image prune
286-
```
287+
```bash
288+
docker image prune
289+
```
287290
288291
### Image Update Notifications - Diun (Docker Image Update Notifier)
289292
290-
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
293+
>[!TIP]
294+
>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
291295
292296
## Building locally
293297
@@ -312,6 +316,7 @@ full_custom_readme: |
312316
313317
## Versions
314318
319+
* **05.12.24:** - Rebase to Alpine 3.21.
315320
* **26.08.24:** - Change `ALLOW_START`, `ALLOW_STOP`, and `ALLOW_RESTARTS` to work even with `POST=0`.
316321
* **24.05.24:** - Rebase to Alpine 3.20.
317322
* **15.04.24:** - Allow disabling IPv6 support for legacy devices.

‎root/docker-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ else
1010
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_nopost.template > /run/default.conf
1111
fi
1212

13+
mkdir /run/nginx-tmp
14+
1315
echo '
1416
───────────────────────────────────────
1517

‎root/etc/nginx/nginx.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ http {
3636
# error code 413. Set to 0 to disable. Default is '1m'.
3737
client_max_body_size 0;
3838

39-
client_body_temp_path /run/nginx-tmp;
40-
proxy_temp_path /run/nginx-tmp;
41-
fastcgi_temp_path /run/nginx-tmp;
42-
uwsgi_temp_path /run/nginx-tmp;
43-
scgi_temp_path /run/nginx-tmp;
39+
client_body_temp_path /run/nginx-tmp/nginx 1 2;
40+
proxy_temp_path /run/nginx-tmp/nginx-proxy;
41+
fastcgi_temp_path /run/nginx-tmp/nginx-fastcgi;
42+
uwsgi_temp_path /run/nginx-tmp/nginx-uwsgi;
43+
scgi_temp_path /run/nginx-tmp/nginx-scgi;
4444

4545
# Sendfile copies data between one FD and other from within the kernel,
4646
# which is more efficient than read() + write(). Default is off.

‎root/templates/default_nopost.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ server {
3333

3434
include /etc/nginx/proxy.conf;
3535

36-
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3736
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/start {if ($path_start = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3837
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/stop {if ($path_stop = 0){return 403;}proxy_pass http://unix:$dockersocket;}
38+
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/(stop|restart|kill) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3939
location ~* ^(/v[\d\.]+)?/auth {limit_except GET HEAD {deny all;}if ($path_auth = 0){return 403;}proxy_pass http://unix:$dockersocket;}
4040
location ~* ^(/v[\d\.]+)?/build {limit_except GET HEAD {deny all;}if ($path_build = 0){return 403;}proxy_pass http://unix:$dockersocket;}
4141
location ~* ^(/v[\d\.]+)?/commit {limit_except GET HEAD {deny all;}if ($path_commit = 0){return 403;}proxy_pass http://unix:$dockersocket;}

‎root/templates/default_nopost_ipv4.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ server {
3232

3333
include /etc/nginx/proxy.conf;
3434

35-
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3635
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/start {if ($path_start = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3736
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/stop {if ($path_stop = 0){return 403;}proxy_pass http://unix:$dockersocket;}
37+
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/(stop|restart|kill) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3838
location ~* ^(/v[\d\.]+)?/auth {limit_except GET HEAD {deny all;}if ($path_auth = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3939
location ~* ^(/v[\d\.]+)?/build {limit_except GET HEAD {deny all;}if ($path_build = 0){return 403;}proxy_pass http://unix:$dockersocket;}
4040
location ~* ^(/v[\d\.]+)?/commit {limit_except GET HEAD {deny all;}if ($path_commit = 0){return 403;}proxy_pass http://unix:$dockersocket;}

‎root/templates/default_post.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ server {
3333

3434
include /etc/nginx/proxy.conf;
3535

36-
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3736
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/start {if ($path_start = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3837
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/stop {if ($path_stop = 0){return 403;}proxy_pass http://unix:$dockersocket;}
38+
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/(stop|restart|kill) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3939
location ~* ^(/v[\d\.]+)?/auth {if ($path_auth = 0){return 403;}proxy_pass http://unix:$dockersocket;}
4040
location ~* ^(/v[\d\.]+)?/build {if ($path_build = 0){return 403;}proxy_pass http://unix:$dockersocket;}
4141
location ~* ^(/v[\d\.]+)?/commit {if ($path_commit = 0){return 403;}proxy_pass http://unix:$dockersocket;}

‎root/templates/default_post_ipv4.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ server {
3232

3333
include /etc/nginx/proxy.conf;
3434

35-
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3635
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/start {if ($path_start = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3736
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/stop {if ($path_stop = 0){return 403;}proxy_pass http://unix:$dockersocket;}
37+
location ~* ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/(stop|restart|kill) {if ($path_restarts = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3838
location ~* ^(/v[\d\.]+)?/auth {if ($path_auth = 0){return 403;}proxy_pass http://unix:$dockersocket;}
3939
location ~* ^(/v[\d\.]+)?/build {if ($path_build = 0){return 403;}proxy_pass http://unix:$dockersocket;}
4040
location ~* ^(/v[\d\.]+)?/commit {if ($path_commit = 0){return 403;}proxy_pass http://unix:$dockersocket;}

0 commit comments

Comments
 (0)
Please sign in to comment.