From 5cb2ed3696cbbe1864d3727ddf09291b19d05c9d Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Wed, 13 Sep 2023 14:43:02 +1000 Subject: [PATCH] Restore custom image for Cross --- Cross.toml | 4 ++-- scripts/cross/Dockerfile | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 scripts/cross/Dockerfile diff --git a/Cross.toml b/Cross.toml index d5f7a5d5068..9c3e441cba5 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,5 +1,5 @@ [target.x86_64-unknown-linux-gnu] -pre-build = ["apt-get install -y cmake clang-3.9"] +dockerfile = './scripts/cross/Dockerfile' [target.aarch64-unknown-linux-gnu] -pre-build = ["apt-get install -y cmake clang-3.9"] +dockerfile = './scripts/cross/Dockerfile' diff --git a/scripts/cross/Dockerfile b/scripts/cross/Dockerfile new file mode 100644 index 00000000000..9456b666ef1 --- /dev/null +++ b/scripts/cross/Dockerfile @@ -0,0 +1,25 @@ +ARG CROSS_BASE_IMAGE +FROM $CROSS_BASE_IMAGE + +RUN apt-get update -y && apt-get upgrade -y + +RUN apt-get install -y unzip && \ + PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \ + curl -L $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip -o protoc.zip && \ + unzip protoc.zip -d /usr && \ + chmod +x /usr/bin/protoc + +RUN apt-get install -y \ + apt-transport-https \ + ca-certificates \ + gnupg-agent \ + software-properties-common + +RUN curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ + apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \ + apt-get update && \ + apt-get install -y clang-5.0 + +RUN apt-get install -y cmake + +ENV PROTOC=/usr/bin/protoc