Skip to content

install sccache in the image #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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)
Expand Down
Loading