31
Dockerfile-full
Normal file
31
Dockerfile-full
Normal file
@@ -0,0 +1,31 @@
|
||||
FROM docker.io/library/rust:${RUST_VERSION}-slim
|
||||
LABEL maintainer 'Jacob Kiers <code@kie.rs>'
|
||||
|
||||
# Install 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
|
||||
RUN mkdir -p /usr/local/cargo/bin && curl -L \
|
||||
https://github.com/cross-rs/cross/releases/download/v${CROSS_VERSION}/cross-x86_64-unknown-linux-gnu.tar.gz \
|
||||
| tar -xz -C /usr/local/cargo/bin
|
||||
|
||||
|
||||
# Install rust targets
|
||||
RUN rustup target add \
|
||||
aarch64-unknown-linux-gnu \
|
||||
aarch64-unknown-linux-musl \
|
||||
x86_64-pc-windows-gnu \
|
||||
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-pc-windows-gnu rust-src && \
|
||||
rustup component add --target x86_64-unknown-linux-gnu rust-src && \
|
||||
rustup component add --target x86_64-unknown-linux-musl rust-src
|
Reference in New Issue
Block a user