rust/Dockerfile

37 lines
1.1 KiB
Text
Raw Normal View History

FROM docker.io/rust:1.80.0-slim-bookworm
2024-05-16 18:52:20 +01:00
# nodejs - runtime used by forgejo/github actions
# curl - to download cargo-binstall
# clang-16 & mold - faster linkers for rust
2024-05-17 07:03:40 +01:00
# pkg-config - required to compile some rust `-sys` packages
# libssl-dev - build dependency for git-next
2024-05-17 07:03:40 +01:00
RUN apt-get update \
&& \
2024-05-16 18:52:20 +01:00
apt-get install -y \
--no-install-recommends \
nodejs=18.19.0+dfsg-6~deb12u2 \
curl=7.88.1-10+deb12u6 \
2024-05-16 18:52:20 +01:00
clang-16=1:16.0.6-15~deb12u1 \
2024-05-17 07:03:40 +01:00
mold=1.10.1+dfsg-1 \
pkg-config=1.8.1-1 \
libssl-dev=3.0.13-1~deb12u1 \
2024-08-03 12:58:00 +01:00
libdbus-1-dev=1.14.10-1~deb12u1 \
git=1:2.39.2-1.1 \
2024-05-17 07:03:40 +01:00
&& \
2024-05-16 18:52:20 +01:00
rm -r /var/lib/apt/lists/*
RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9.0/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \
2024-05-16 18:52:20 +01:00
tar -xzf cargo-binstall.tgz && \
rm cargo-binstall.tgz && \
mv cargo-binstall /usr/local/bin/
RUN cargo binstall -y cargo-chef@0.1.67
2024-05-16 18:52:20 +01:00
RUN rustup component add rustfmt clippy
COPY entrypoint.sh /
2024-06-13 19:48:39 +01:00
RUN git config --global user.email "action@git.kemitix.net" && git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust"
2024-05-16 18:52:20 +01:00
ENTRYPOINT [ "/entrypoint.sh" ]