Skip to content

Commit 03aebbc

Browse files
authored
Merge pull request #172 from linuxserver/3.21-initial
2 parents d3eccd1 + cc8c2b5 commit 03aebbc

File tree

15 files changed

+238
-180
lines changed

15 files changed

+238
-180
lines changed

.github/workflows/external_trigger.yml

Lines changed: 17 additions & 15 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 master branch. To disable this trigger, add \`baseimage-alpine-nginx_master\` 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=$(echo $(curl -sL http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')_$(curl -sL http://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz | tar -xz -C /tmp && awk '/^P:'"php83"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'))
26+
EXT_RELEASE=$(echo $(curl -sL http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')_$(curl -sL http://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz | tar -xz -C /tmp && awk '/^P:'"php83"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'))
2727
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
2828
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2929
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
@@ -39,20 +39,22 @@ jobs:
3939
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
4040
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
4141
image="linuxserver/baseimage-alpine-nginx"
42-
tag="3.20"
42+
tag="3.21"
4343
token=$(curl -sX GET \
4444
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fbaseimage-alpine-nginx%3Apull" \
4545
| jq -r '.token')
46-
multidigest=$(curl -s \
47-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
48-
--header "Authorization: Bearer ${token}" \
49-
"https://ghcr.io/v2/${image}/manifests/${tag}" \
50-
| jq -r 'first(.manifests[].digest)')
51-
digest=$(curl -s \
52-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
53-
--header "Authorization: Bearer ${token}" \
54-
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
55-
| jq -r '.config.digest')
46+
multidigest=$(curl -s \
47+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
48+
--header "Accept: application/vnd.oci.image.index.v1+json" \
49+
--header "Authorization: Bearer ${token}" \
50+
"https://ghcr.io/v2/${image}/manifests/${tag}")
51+
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
52+
digest=$(curl -s \
53+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
54+
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
55+
--header "Authorization: Bearer ${token}" \
56+
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
57+
| jq -r '.config.digest')
5658
image_info=$(curl -sL \
5759
--header "Authorization: Bearer ${token}" \
5860
"https://ghcr.io/v2/${image}/blobs/${digest}")
@@ -66,7 +68,7 @@ jobs:
6668
if [ -z "${IMAGE_VERSION}" ]; then
6769
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
6870
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
69-
FAILURE_REASON="Can't retrieve last pushed version for baseimage-alpine-nginx tag 3.20"
71+
FAILURE_REASON="Can't retrieve last pushed version for baseimage-alpine-nginx tag 3.21"
7072
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
7173
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
7274
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
@@ -83,7 +85,7 @@ jobs:
8385
if [[ "${artifacts_found}" == "false" ]]; then
8486
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
8587
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
86-
FAILURE_REASON="New version ${EXT_RELEASE} for baseimage-alpine-nginx tag 3.20 is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
88+
FAILURE_REASON="New version ${EXT_RELEASE} for baseimage-alpine-nginx tag 3.21 is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
8789
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
8890
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
8991
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
@@ -109,7 +111,7 @@ jobs:
109111
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
110112
--data-urlencode "Submit=Submit"
111113
echo "**** Notifying Discord ****"
112-
TRIGGER_REASON="A version change was detected for baseimage-alpine-nginx tag 3.20. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
114+
TRIGGER_REASON="A version change was detected for baseimage-alpine-nginx tag 3.21. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
113115
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
114116
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
115117
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

Dockerfile

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

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

55
# set version label
66
ARG BUILD_DATE
77
ARG VERSION
88
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
99
LABEL maintainer="nemchik"
1010

11+
ENV PHP_INI_SCAN_DIR=":/config/php"
12+
1113
# install packages
1214
RUN \
1315
echo "**** install build packages ****" && \
@@ -57,14 +59,16 @@ RUN \
5759
/etc/php83/php-fpm.d/www.conf && \
5860
sed -i "s#group = nobody.*#group = abc#g" \
5961
/etc/php83/php-fpm.d/www.conf && \
62+
echo "**** add run paths to php runtime config ****" && \
63+
grep -qxF 'include=/config/php/*.conf' /etc/php83/php-fpm.conf || echo 'include=/config/php/*.conf' >> /etc/php83/php-fpm.conf && \
6064
echo "**** install php composer ****" && \
6165
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" && \
6266
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
6367
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" && \
6468
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then \
65-
>&2 echo 'ERROR: Invalid installer checksum' && \
66-
rm composer-setup.php && \
67-
exit 1; \
69+
>&2 echo 'ERROR: Invalid installer checksum' && \
70+
rm composer-setup.php && \
71+
exit 1; \
6872
fi && \
6973
php composer-setup.php --install-dir=/usr/bin && \
7074
rm composer-setup.php && \

Dockerfile.aarch64

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

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

55
# set version label
66
ARG BUILD_DATE
77
ARG VERSION
88
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
99
LABEL maintainer="nemchik"
1010

11+
ENV PHP_INI_SCAN_DIR=":/config/php"
12+
1113
# install packages
1214
RUN \
1315
echo "**** install build packages ****" && \
@@ -57,14 +59,16 @@ RUN \
5759
/etc/php83/php-fpm.d/www.conf && \
5860
sed -i "s#group = nobody.*#group = abc#g" \
5961
/etc/php83/php-fpm.d/www.conf && \
62+
echo "**** add run paths to php runtime config ****" && \
63+
grep -qxF 'include=/config/php/*.conf' /etc/php83/php-fpm.conf || echo 'include=/config/php/*.conf' >> /etc/php83/php-fpm.conf && \
6064
echo "**** install php composer ****" && \
6165
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" && \
6266
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
6367
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" && \
6468
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then \
65-
>&2 echo 'ERROR: Invalid installer checksum' && \
66-
rm composer-setup.php && \
67-
exit 1; \
69+
>&2 echo 'ERROR: Invalid installer checksum' && \
70+
rm composer-setup.php && \
71+
exit 1; \
6872
fi && \
6973
php composer-setup.php --install-dir=/usr/bin && \
7074
rm composer-setup.php && \

0 commit comments

Comments
 (0)