-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: experimental: use build base image
- Loading branch information
Showing
1 changed file
with
24 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,35 +254,39 @@ WORKDIR /platform | |
# Download and install cargo-binstall | ||
ENV BINSTALL_VERSION=1.10.11 | ||
RUN set -ex; \ | ||
if [ "$TARGETARCH" = "amd64" ]; then \ | ||
CARGO_BINSTALL_ARCH="x86_64-unknown-linux-musl"; \ | ||
elif [ "$TARGETARCH" = "arm64" ]; then \ | ||
CARGO_BINSTALL_ARCH="aarch64-unknown-linux-musl"; \ | ||
else \ | ||
echo "Unsupported architecture: $TARGETARCH"; exit 1; \ | ||
fi; \ | ||
# Construct download URL | ||
DOWNLOAD_URL="https://github.com/cargo-bins/cargo-binstall/releases/download/v${BINSTALL_VERSION}/cargo-binstall-${CARGO_BINSTALL_ARCH}.tgz"; \ | ||
# Download and extract the cargo-binstall binary | ||
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L --proto '=https' --tlsv1.2 -sSf "$DOWNLOAD_URL" | tar -xvzf -; \ | ||
./cargo-binstall -y --force cargo-binstall; \ | ||
rm ./cargo-binstall; \ | ||
source $HOME/.cargo/env; \ | ||
cargo binstall -V | ||
RUN source $HOME/.cargo/env; \ | ||
cargo binstall [email protected] [email protected] \ | ||
RUN <<EOS | ||
set -ex; | ||
if [ "$TARGETARCH" = "amd64" ]; then | ||
CARGO_BINSTALL_ARCH="x86_64-unknown-linux-musl"; | ||
elif [ "$TARGETARCH" = "arm64" ]; then | ||
CARGO_BINSTALL_ARCH="aarch64-unknown-linux-musl"; | ||
else | ||
echo "Unsupported architecture: $TARGETARCH"; exit 1; | ||
fi; | ||
# Construct download URL | ||
DOWNLOAD_URL="https://github.com/cargo-bins/cargo-binstall/releases/download/v${BINSTALL_VERSION}/cargo-binstall-${CARGO_BINSTALL_ARCH}.tgz"; | ||
# Download and extract the cargo-binstall binary | ||
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L --proto '=https' --tlsv1.2 -sSf "$DOWNLOAD_URL" | tar -xvzf -; | ||
./cargo-binstall -y --force cargo-binstall; | ||
rm ./cargo-binstall; | ||
source $HOME/.cargo/env; | ||
cargo binstall -V | ||
source $HOME/.cargo/env; | ||
cargo binstall [email protected] [email protected] \ | ||
--locked \ | ||
--no-discover-github-token \ | ||
--disable-telemetry \ | ||
--no-track \ | ||
--no-confirm | ||
EOS | ||
# | ||
# Rust build planner to speed up builds | ||
# | ||
FROM deps AS build-planner | ||
FROM lklimek/dash-platform-build-base AS build-planner | ||
WORKDIR /platform | ||
COPY . . | ||
|
@@ -489,7 +493,6 @@ FROM build-js AS build-test-suite | |
# node_modules directory to reuse built binaries | ||
RUN yarn workspaces focus --production @dashevo/platform-test-suite | ||
|
||
# | ||
# STAGE: FINAL TEST SUITE IMAGE | ||
# | ||
FROM node:20-alpine${ALPINE_VERSION} AS test-suite | ||
|