Skip to content

Commit

Permalink
fix: use correct bun architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
ksassnowski committed Jul 31, 2024
1 parent 9a252f7 commit 7f009e8
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM php:8.3-alpine3.17

# https://github.com/oven-sh/bun/issues/5545#issuecomment-1722461083
ARG GLIBC_VERSION_AARCH64=2.26-r1

# Add docker-php-extension-installer script
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

Expand Down Expand Up @@ -34,7 +37,7 @@ RUN apk add --no-cache \
zlib-dev

# Install Bun and PHP extensions
RUN curl "https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64-baseline.zip" \
RUN curl "https://github.com/oven-sh/bun/releases/latest/download/bun-linux-aarch64.zip" \
-fsSLO \
--compressed \
--retry 5 \
Expand All @@ -46,13 +49,25 @@ RUN curl "https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64-
--retry 5 && \
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
|| (echo "error: failed to verify: latest" && exit 1) && \
grep " bun-linux-x64-baseline.zip\$" SHASUMS256.txt | sha256sum -c - \
grep " bun-linux-aarch64.zip\$" SHASUMS256.txt | sha256sum -c - \
|| (echo "error: failed to verify: latest" && exit 1) && \
unzip "bun-linux-x64-baseline.zip" && \
mv "bun-linux-x64-baseline/bun" /usr/local/bin/bun && \
rm -f "bun-linux-x64-baseline.zip" SHASUMS256.txt.asc SHASUMS256.txt && \
unzip "bun-linux-aarch64.zip" && \
mv "bun-linux-aarch64/bun" /usr/local/bin/bun && \
rm -f "bun-linux-aarch64.zip" SHASUMS256.txt.asc SHASUMS256.txt && \
chmod +x /usr/local/bin/bun && \
chmod +x /usr/local/bin/install-php-extensions && \
curl "https://raw.githubusercontent.com/squishyu/alpine-pkg-glibc-aarch64-bin/master/glibc-${GLIBC_VERSION_AARCH64}.apk" \
-fsSLO \
--compressed \
--retry 5 \
|| (echo "error: failed to download: glibc v${GLIBC_VERSION_AARCH64}" && exit 1) && \
mv "glibc-${GLIBC_VERSION_AARCH64}.apk" glibc.apk && \
curl "https://raw.githubusercontent.com/squishyu/alpine-pkg-glibc-aarch64-bin/master/glibc-bin-${GLIBC_VERSION_AARCH64}.apk" \
-fsSLO \
--compressed \
--retry 5 \
|| (echo "error: failed to download: glibc-bin v${GLIBC_VERSION_AARCH64}" && exit 1) && \
mv "glibc-bin-${GLIBC_VERSION_AARCH64}.apk" glibc-bin.apk && \
install-php-extensions \
@composer \
redis-stable \
Expand Down

0 comments on commit 7f009e8

Please sign in to comment.