Some checks reported errors
continuous-integration/drone Build was killed
Signed-off-by: Jochen maes <jochen@sejo-it.be>
28 lines
1.3 KiB
Docker
28 lines
1.3 KiB
Docker
# Base image. Change this to use another Rust version.
|
|
FROM rust:1.73-slim
|
|
|
|
# Install Docker (for docker-in-docker)
|
|
RUN apt-get update \
|
|
&& apt-get install -y ca-certificates curl gnupg \
|
|
&& mkdir -p /etc/apt/keyrings \
|
|
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable" >> /etc/apt/sources.list.d/docker.list \
|
|
&& apt-get update \
|
|
&& apt-get install -y docker-ce-cli \
|
|
&& apt-get clean
|
|
|
|
# Install cross v0.2.4
|
|
RUN mkdir -p /usr/local/cargo/bin && curl -L https://github.com/cross-rs/cross/releases/download/v0.2.4/cross-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C /usr/local/cargo/bin
|
|
|
|
# (Optional) Pre-install rust targets
|
|
# This significantly reduces build time, at the cost of an increased image size
|
|
RUN rustup target add \
|
|
aarch64-unknown-linux-gnu \
|
|
aarch64-unknown-linux-musl \
|
|
x86_64-unknown-linux-gnu \
|
|
x86_64-unknown-linux-musl \
|
|
&& rustup component add --target aarch64-unknown-linux-gnu rust-src \
|
|
&& rustup component add --target aarch64-unknown-linux-musl rust-src \
|
|
&& rustup component add --target x86_64-unknown-linux-gnu rust-src \
|
|
&& rustup component add --target x86_64-unknown-linux-musl rust-src
|