Last active
June 30, 2022 06:53
-
-
Save ziadoz/ee2e73450c344f1953e53c018a2a63a7 to your computer and use it in GitHub Desktop.
Install glibc on PHP Alpine Docker Image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8-cli-alpine | |
# @see: @see: https://stackoverflow.com/a/65969295 | |
RUN apk --no-cache add binutils curl \ | |
&& GLIBC_VER=$(curl -s https://api.github.com/repos/sgerrand/alpine-pkg-glibc/releases/latest | grep tag_name | cut -d : -f 2 | tr -d \",' ') \ | |
&& curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ | |
&& curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \ | |
&& curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk \ | |
&& apk add --no-cache \ | |
glibc-${GLIBC_VER}.apk \ | |
glibc-bin-${GLIBC_VER}.apk \ | |
&& apk --no-cache del binutils curl \ | |
&& rm glibc-${GLIBC_VER}.apk \ | |
&& rm glibc-bin-${GLIBC_VER}.apk \ | |
&& rm -rf /var/cache/apk/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@vincentchalamon Good spot. I've changed it. 👍