Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
skaji committed Dec 29, 2024
1 parent f2cc64e commit 794aa71
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
FROM buildpack-deps:stable AS static-libcrypt
FROM buildpack-deps:bookworm AS static-libcrypt

# XXX: We use ubuntu:20.04(focal)'s libcrypt.a
# because ubuntu:18.04(bionic)'s libcrypt.a depends on __snprintf
# see: objdump -x libcrypt.a | grep snprintf

# https://launchpad.net/ubuntu/focal/amd64/libcrypt-dev/
# https://launchpad.net/ubuntu/focal/arm64/libcrypt-dev/
ARG LIBCRYPT_DEV=libcrypt-dev_4.4.36-5
RUN set -eux; \
mkdir /libc6-dev; \
cd /tmp; \
if [ $(uname -m) = x86_64 ]; then \
curl -fsSL -O https://archive.ubuntu.com/ubuntu/pool/main/libx/libxcrypt/${LIBCRYPT_DEV}_amd64.deb; \
dpkg-deb -x ${LIBCRYPT_DEV}_amd64.deb /libc6-dev; \
curl -fsSL -O http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.23-0ubuntu3_amd64.deb; \
dpkg-deb -x libc6-dev_2.23-0ubuntu3_amd64.deb /libc6-dev; \
cp /libc6-dev/usr/lib/x86_64-linux-gnu/libcrypt.a /libcrypt.a; \
else \
curl -fsSL -O https://ports.ubuntu.com/pool/main/libx/libxcrypt/${LIBCRYPT_DEV}_arm64.deb; \
dpkg-deb -x ${LIBCRYPT_DEV}_arm64.deb /libc6-dev; \
curl -fsSL -O http://ports.ubuntu.com/pool/main/g/glibc/libc6-dev_2.23-0ubuntu3_arm64.deb; \
dpkg-deb -x libc6-dev_2.23-0ubuntu3_arm64.deb /libc6-dev; \
cp /libc6-dev/usr/lib/aarch64-linux-gnu/libcrypt.a /libcrypt.a; \
fi; \
:
Expand Down

0 comments on commit 794aa71

Please sign in to comment.