Skip to content
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

fix broken release due to wrong rust version and resolver conflit, remove the dockerfile caching as it is not used anyway. #4331

Merged
merged 2 commits into from
May 28, 2021
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
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions Dockerfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down