diff --git a/Dockerfile b/Dockerfile index 4d0bd1266f6..35d8f21aa7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,17 +29,13 @@ COPY . . ENV CARGO_TARGET_DIR=/tmp/target ENV RUSTC_FLAGS='-C target-cpu=x86-64' ENV PORTABLE=ON -RUN --mount=type=cache,target=/tmp/target \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=/usr/local/cargo/registry \ - cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release && \ +RUN cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release && \ mkdir /tmp/build && \ cd /tmp/target/release && \ mv ./neard /tmp/build COPY scripts/run_docker.sh /tmp/build/run.sh - # Actual image FROM ubuntu:18.04 diff --git a/Dockerfile.nightly b/Dockerfile.nightly index 762edd26cde..e43cb044c4e 100644 --- a/Dockerfile.nightly +++ b/Dockerfile.nightly @@ -29,10 +29,7 @@ COPY . . ENV CARGO_TARGET_DIR=/tmp/target ENV RUSTC_FLAGS='-C target-cpu=x86-64' ENV PORTABLE=ON -RUN --mount=type=cache,target=/tmp/target \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=/usr/local/cargo/registry \ - cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release --features nightly_protocol --features nightly_protocol_features && \ +RUN cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release --features nightly_protocol --features nightly_protocol_features && \ mkdir /tmp/build && \ cd /tmp/target/release && \ mv ./neard /tmp/build diff --git a/Makefile b/Makefile index f228c78b0eb..cbe93b26c4a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ docker-nearcore: - DOCKER_BUILDKIT=1 docker build -t nearcore -f Dockerfile . + DOCKER_BUILDKIT=1 docker build -t nearcore -f Dockerfile --progress=plain . docker-nearcore-nightly: - DOCKER_BUILDKIT=1 docker build -t nearcore-nightly -f Dockerfile.nightly . + DOCKER_BUILDKIT=1 docker build -t nearcore-nightly -f Dockerfile.nightly --progress=plain . -RUST_OPTIONS:=+stable +RUST_OPTIONS:=$(cat rust-toolchain) export RUSTFLAGS = -D warnings