diff --git a/justfile b/justfile index 2c17d6dfd0..df2be6a062 100644 --- a/justfile +++ b/justfile @@ -71,7 +71,7 @@ dev-commitment: --deploy build-docker-images: - scripts/build-docker-images + scripts/build-docker-images-native # generate rust bindings for contracts REGEXP := "^LightClient$|^LightClientStateUpdateVK$|^FeeContract$|^HotShot$|PlonkVerifier$|^ERC1967Proxy$|^LightClientMock$|^LightClientStateUpdateVKMock$|^PlonkVerifier2$" diff --git a/scripts/build-docker-images-native b/scripts/build-docker-images-native index 0b89f34da6..43f1f32438 100755 --- a/scripts/build-docker-images-native +++ b/scripts/build-docker-images-native @@ -54,6 +54,11 @@ case $KERNEL in # Use a different target directory for docker builds to avoid conflicts with # native builds. CARGO_TARGET_DIR=target/docker + CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}" + + # Pull our latest devops-rust image. Using an older image may cause a failing + # rustup channels sync. + docker pull ghcr.io/espressosystems/devops-rust:stable # Build in docker container: # - RUSTFLAGS is needed for compilation. diff --git a/scripts/build-docker-images b/scripts/build-docker-images-static similarity index 94% rename from scripts/build-docker-images rename to scripts/build-docker-images-static index 27e478a834..d3c15da983 100755 --- a/scripts/build-docker-images +++ b/scripts/build-docker-images-static @@ -1,4 +1,10 @@ #!/usr/bin/env bash +if [[ "$(uname -s)" != "Linux" ]]; then + echo "This script only works on Linux." + echo "On macOS, use scripts/build-docker-images-native instead." + exit 1 +fi + set -euxo pipefail nix develop .#crossShell --ignore-environment --command cargo build --release @@ -65,4 +71,4 @@ docker build -t ghcr.io/espressosystems/espresso-sequencer/bridge:main -f docker docker build -t ghcr.io/espressosystems/espresso-sequencer/marketplace-solver:main -f docker/marketplace-solver.Dockerfile ${WORKDIR} docker build -t ghcr.io/espressosystems/espresso-sequencer/marketplace-builder:main -f docker/marketplace-builder.Dockerfile ${WORKDIR} docker build -t ghcr.io/espressosystems/espresso-sequencer/node-validator:main -f docker/node-validator.Dockerfile ${WORKDIR} -docker build -t ghcr.io/espressosystems/espresso-sequencer/dev-rollup:main -f docker/dev-rollup.Dockerfile ${WORKDIR} \ No newline at end of file +docker build -t ghcr.io/espressosystems/espresso-sequencer/dev-rollup:main -f docker/dev-rollup.Dockerfile ${WORKDIR}