From ce9a586d6c9d080fa6f936a56dbdc1f7199ab27f Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 28 Jul 2023 09:20:02 +0800 Subject: [PATCH] Disable default toolchain and update dockerfiles --- .github/actions/build/action.yml | 2 +- .github/workflows/release.yml | 2 +- .maintain/docker/ubuntu:20.04 | 5 ----- .../{build.Dockerfile => ubuntu:20.04.Dockerfile} | 14 ++++---------- 4 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 .maintain/docker/ubuntu:20.04 rename .maintain/docker/{build.Dockerfile => ubuntu:20.04.Dockerfile} (54%) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index ec40a43ce..44887dd53 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -18,7 +18,7 @@ inputs: build_dockerfile: description: "build dockerfile path" required: true - default: ".maintain/docker/build.Dockerfile" + default: ".maintain/docker/ubuntu:20.04.Dockerfile" enable_cache: description: "enable cache" required: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3783f48f9..e018e688c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - file: .maintain/docker/build.Dockerfile + file: .maintain/docker/ubuntu:20.04.Dockerfile tags: darwinia-network/build-tool:latest - name: Build testnets diff --git a/.maintain/docker/ubuntu:20.04 b/.maintain/docker/ubuntu:20.04 deleted file mode 100644 index a6d8ae26a..000000000 --- a/.maintain/docker/ubuntu:20.04 +++ /dev/null @@ -1,5 +0,0 @@ -FROM ubuntu:20.04 - -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=Etc/UTC -RUN apt-get -y update && apt-get -y install clang gcc g++ llvm libssl-dev libudev-dev make git pkg-config protobuf-compiler diff --git a/.maintain/docker/build.Dockerfile b/.maintain/docker/ubuntu:20.04.Dockerfile similarity index 54% rename from .maintain/docker/build.Dockerfile rename to .maintain/docker/ubuntu:20.04.Dockerfile index ad753d482..ebaa0a065 100644 --- a/.maintain/docker/build.Dockerfile +++ b/.maintain/docker/ubuntu:20.04.Dockerfile @@ -1,20 +1,14 @@ FROM ubuntu:20.04 -ARG RUST_TOOLCHAIN=nightly - - RUN apt-get update \ && apt install --no-install-recommends -y \ - ca-certificates curl git python3-pip \ - clang make gcc g++ libssl-dev pkg-config protobuf-compiler \ + ca-certificates curl git python3-pip \ + clang make gcc g++ libssl-dev pkg-config protobuf-compiler \ && pip3 install --upgrade pip \ && pip3 install cmake --upgrade \ - && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ - && . "/root/.cargo/env" \ - && rustup default $RUST_TOOLCHAIN + && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none \ + && . "/root/.cargo/env" ENV PATH="$PATH:/root/.cargo/bin" WORKDIR /build - -