diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index af4a399..a29c3b6 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -59,6 +59,7 @@ ENV SSL_VER="1.1.1w" \ PQ_VER="11.12" \ SQLITE_VER="3450100" \ PROTOBUF_VER="25.2" \ + SCCACHE_VERSION="0.8.0" \ CC=musl-gcc \ PREFIX=/musl \ PATH=/usr/local/bin:/root/.cargo/bin:$PATH \ @@ -72,6 +73,12 @@ RUN cd /tmp && \ cp bin/protoc /usr/bin/protoc && \ rm -rf * +# Install prebuilt sccache based on platform +RUN curl -sSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-aarch64-unknown-linux-musl.tar.gz | tar xz && \ + mv sccache-v${SCCACHE_VERSION}-*-unknown-linux-musl/sccache /usr/local/bin/ && \ + chmod +x /usr/local/bin/sccache && \ + rm -rf sccache-v${SCCACHE_VERSION}-*-unknown-linux-musl + # Set up a prefix for musl build libraries, make the linker's job of finding them easier # Primarily for the benefit of postgres. # Lastly, link some linux-headers for openssl 1.1 (not used herein) diff --git a/Dockerfile.x86_64 b/Dockerfile.x86_64 index 8a3759d..1c15e5c 100644 --- a/Dockerfile.x86_64 +++ b/Dockerfile.x86_64 @@ -58,6 +58,7 @@ ENV SSL_VER="1.1.1w" \ PQ_VER="11.12" \ SQLITE_VER="3450100" \ PROTOBUF_VER="25.2" \ + SCCACHE_VERSION="0.8.0" \ CC=musl-gcc \ PREFIX=/musl \ PATH=/usr/local/bin:/root/.cargo/bin:$PATH \ @@ -71,6 +72,12 @@ RUN cd /tmp && \ cp bin/protoc /usr/bin/protoc && \ rm -rf * +# Install prebuilt sccache based on platform +RUN curl -sSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | tar xz && \ + mv sccache-v${SCCACHE_VERSION}-*-unknown-linux-musl/sccache /usr/local/bin/ && \ + chmod +x /usr/local/bin/sccache && \ + rm -rf sccache-v${SCCACHE_VERSION}-*-unknown-linux-musl + # Set up a prefix for musl build libraries, make the linker's job of finding them easier # Primarily for the benefit of postgres. # Lastly, link some linux-headers for openssl 1.1 (not used herein)