# 获取 glibc 的最新版本号
RUN LATEST_VERSION=$(curl -s
https://api.github.com/repos/sgerrand/alpine-pkg-glibc/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")') && \
curl -L -o /etc/apk/keys/sgerrand.rsa.pub
https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
curl -LO
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${LATEST_VERSION}/glibc-${LATEST_VERSION}.apk && \
curl -LO
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${LATEST_VERSION}/glibc-bin-${LATEST_VERSION}.apk && \
curl -LO
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${LATEST_VERSION}/glibc-dev-${LATEST_VERSION}.apk && \
curl -LO
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${LATEST_VERSION}/glibc-i18n-${LATEST_VERSION}.apk && \
apk add --force-overwrite glibc-${LATEST_VERSION}.apk && \
rm glibc-${LATEST_VERSION}.apk && \
apk add --force-overwrite glibc-bin-${LATEST_VERSION}.apk && \
rm glibc-bin-${LATEST_VERSION}.apk && \
apk add --force-overwrite glibc-dev-${LATEST_VERSION}.apk && \
rm glibc-dev-${LATEST_VERSION}.apk && \
apk add --force-overwrite glibc-i18n-${LATEST_VERSION}.apk && \
rm glibc-i18n-${LATEST_VERSION}.apk