Skip to content

Commit 7a60eef

Browse files
authored
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'

0 commit comments

Comments
 (0)