commit 70fde51c0fdf98a5eac06e2fc8644953a49ccba1 Author: Dominic Grimm Date: Sat Dec 2 10:12:06 2023 +0100 Init diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..66c5fc4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +ARG RUST_VERSION +FROM docker.io/clux/muslrust:${RUST_VERSION} +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + wget \ + software-properties-common \ + clang && \ + rm -rf /var/cache/apt/archives /var/lib/apt/lists/* +WORKDIR /tmp +ARG MOLD_VERSION +RUN wget -qO- https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-x86_64-linux.tar.gz | tar xzf - \ + && cp -RT mold-${MOLD_VERSION}-x86_64-linux /usr/local \ + && rm -rf mold-${MOLD_VERSION}-x86_64-linux +RUN cargo install cargo-chef --version 0.1.62 --locked +WORKDIR /env +RUN echo MOLD=$(which mold) > .env diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e4b2979 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: build + +RUST_VERSION = 1.74.0 +MOLD_VERSION = 2.4.0 + +build: + docker build . \ + -t git.dergrimm.net/dergrimm/muslrust:$(RUST_VERSION) \ + --build-arg="RUST_VERSION=$(RUST_VERSION)" \ + --build-arg="MOLD_VERSION=$(MOLD_VERSION)"