Skip to content

Commit d7f2f01

Browse files
author
Nils Bars
committed
Add Go and Rust toolchains to ref-docker-base
Install the golang apt package, plus rustup (stable, default profile) with the rust-analyzer component. Add mold and lld for faster linking.
1 parent 704d911 commit d7f2f01

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

ref-docker-base/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN apt install -y \
99
ca-certificates \
1010
gcc gcc-multilib g++-multilib \
1111
git \
12+
golang \
1213
iproute2 iputils-ping net-tools \
1314
libssl-dev libffi-dev \
1415
make \
@@ -19,6 +20,8 @@ RUN apt install -y \
1920
netcat-traditional \
2021
hexcurse \
2122
clang \
23+
lld \
24+
mold \
2225
socat \
2326
man-db \
2427
rsync \
@@ -45,6 +48,16 @@ ENV PATH="/root/.local/bin:$PATH"
4548
COPY pyproject.toml /tmp/pyproject.toml
4649
RUN cd /tmp && uv pip install --system --break-system-packages . && rm /tmp/pyproject.toml
4750

51+
# Install Rust toolchain via rustup (system-wide, stable, default profile:
52+
# rustc, cargo, rust-std, rust-docs, rustfmt, clippy).
53+
ENV RUSTUP_HOME=/usr/local/rustup \
54+
CARGO_HOME=/usr/local/cargo \
55+
PATH=/usr/local/cargo/bin:$PATH
56+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
57+
sh -s -- -y --default-toolchain stable --profile default --no-modify-path \
58+
&& rustup component add rust-analyzer \
59+
&& chmod -R a+rX "$RUSTUP_HOME" "$CARGO_HOME"
60+
4861
RUN wget -4 https://raw.githubusercontent.com/eficode/wait-for/master/wait-for -O /usr/bin/wait-for \
4962
&& chmod 555 /usr/bin/wait-for
5063

0 commit comments

Comments
 (0)