1
0
mirror of https://gitlab.com/jarylc/docker-duoauthproxy.git synced 2026-02-04 09:46:44 +00:00

use the latest version of alpine possible instead of the oldest

This commit is contained in:
Jaryl Chng
2025-04-24 21:51:08 +08:00
parent b6725e4ece
commit 375e36d279
2 changed files with 3 additions and 2 deletions

View File

@@ -1,8 +1,8 @@
ARG PYTHON_VERSION
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION} AS builder
ARG PYTHON_VERSION
ARG VERSION
ARG CHECKSUM
ARG CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1

View File

@@ -11,7 +11,8 @@ CHECKSUM=$(echo "$INFO" | cut -d' ' -f1)
LATEST=$(echo "$INFO" | cut -d'-' -f2)
PYTHON_VERSION=$(curl -s https://duo.com/docs/authproxy-notes | grep -Eo 'Python to \d+\.\d+\.\d+' | head -n1 | rev | cut -d' ' -f1 | rev)
ALPINE_VERSION='edge'
for ALPINE_VERSION in $(curl -s "https://pkgs.alpinelinux.org/packages?name=python${PYTHON_VERSION%.*.*}" | htmlq -w --text 'select#branch > option' | grep -v 'Branch' | grep -v 'edge' | tac | xargs); do
for ALPINE_VERSION in $(curl -s "https://pkgs.alpinelinux.org/packages?name=python${PYTHON_VERSION%.*.*}" | htmlq -w --text 'select#branch > option' | grep -v 'Branch' | grep -v 'edge' | xargs); do
echo "Checking Alpine version: ${ALPINE_VERSION}"
if curl -s "https://pkgs.alpinelinux.org/packages?name=python${PYTHON_VERSION%.*.*}&branch=${ALPINE_VERSION}" | grep -q ${PYTHON_VERSION%.*}; then
ALPINE_VERSION="${ALPINE_VERSION/v/}"
break