Skip to content

Commit 3379932

Browse files
authored
Merge pull request #134 from emqx/250729-add-rust-toolchain
feat: add rustup for base images, and use rust 1.88.0 by default
2 parents ecee9ee + 6d6e1c9 commit 3379932

File tree

19 files changed

+85
-9
lines changed

19 files changed

+85
-9
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ jobs:
4343
"ubuntu22.04",
4444
"ubuntu20.04",
4545
"ubuntu18.04",
46-
"debian12",
47-
"debian11",
48-
"debian10",
49-
"el9",
50-
"el8",
51-
"el7",
52-
"amzn2",
53-
"amzn2023",
46+
"debian12",
47+
"debian11",
48+
"debian10",
49+
"el9",
50+
"el8",
51+
"el7",
52+
"amzn2",
53+
"amzn2023",
5454
"alpine3.15.1",
5555
"alpine3.21.3"
5656
]'

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ ENV ERL_AFLAGS="-kernel shell_history enabled"
77
ARG BUILD_WITHOUT_QUIC=false
88
ARG OTP_VERSION=27.3.4.2-1
99
ARG ELIXIR_VERSION=1.18.3
10+
ARG RUST_VERSION=1.88.0
1011
ARG FDB_VERSION=7.3.43
1112
ARG EMQTT_BENCH_VERSION=0.4.25
1213
ARG LUX_VERSION=lux-3.0
1314

14-
COPY get-otp.sh get-zsh.sh get-elixir.sh get-fdb.sh get-emqtt-bench.sh get-lux.sh /
15+
COPY get-otp.sh get-zsh.sh get-elixir.sh get-fdb.sh get-rust.sh get-emqtt-bench.sh get-lux.sh /
1516

1617
RUN if [ -f /opt/rh/devtoolset-10/enable ]; then source /opt/rh/devtoolset-10/enable; fi && \
1718
. /etc/os-release && export ID=$ID && export VERSION_ID=$VERSION_ID && \
@@ -22,6 +23,7 @@ RUN if [ -f /opt/rh/devtoolset-10/enable ]; then source /opt/rh/devtoolset-10/en
2223
/get-otp.sh ${OTP_VERSION} && \
2324
/get-elixir.sh ${ELIXIR_VERSION} && \
2425
if [ "${OTP_VERSION#26.}" != "$OTP_VERSION" ]; then /get-fdb.sh ${FDB_VERSION}; fi && \
26+
if echo "${OTP_VERSION}" | grep -q "^27\."; then /get-rust.sh ${RUST_VERSION}; fi && \
2527
/get-emqtt-bench.sh ${EMQTT_BENCH_VERSION} && \
2628
/get-lux.sh ${LUX_VERSION} && \
2729
rm /get-otp.sh /get-zsh.sh /get-elixir.sh /get-fdb.sh /get-emqtt-bench.sh /get-lux.sh

alpine3.15.1/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
4949
COPY get-cmake.sh /get-cmake.sh
5050
RUN /get-cmake.sh build
5151

52+
# Install Rustup
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
54+
ENV PATH="/root/.cargo/bin:${PATH}"
55+
5256
CMD [ "/bin/sh" ]

alpine3.21.3/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@ RUN apk add --no-cache --virtual .build-deps \
4747
COPY get-cmake.sh /get-cmake.sh
4848
RUN /get-cmake.sh build
4949

50+
# Install Rustup
51+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
52+
ENV PATH="/root/.cargo/bin:${PATH}"
53+
5054
CMD [ "/bin/sh" ]

amzn2/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@ RUN yum clean packages && \
6565
ENV LC_ALL=C.UTF-8
6666
ENV LANG=C.UTF-8
6767

68+
# Install Rustup
69+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
70+
ENV PATH="/root/.cargo/bin:${PATH}"
71+
6872
CMD [ "/bin/bash" ]

amzn2023/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ WORKDIR /
3333
ENV LC_ALL=C.UTF-8
3434
ENV LANG=C.UTF-8
3535

36+
# Install Rustup
37+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
38+
ENV PATH="/root/.cargo/bin:${PATH}"
39+
3640
CMD [ "/bin/bash" ]

debian10/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,9 @@ RUN /get-cmake.sh build && rm /get-cmake.sh
8383
ENV LC_ALL=C.UTF-8
8484
ENV LANG=C.UTF-8
8585

86+
# Install Rustup
87+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
88+
ENV PATH="/root/.cargo/bin:${PATH}"
89+
8690
WORKDIR /
8791
CMD [ "/bin/bash" ]

debian11/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,9 @@ RUN apt-get clean\
5959
ENV LC_ALL=C.UTF-8
6060
ENV LANG=C.UTF-8
6161

62+
# Install Rustup
63+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
64+
ENV PATH="/root/.cargo/bin:${PATH}"
65+
6266
WORKDIR /
6367
CMD [ "/bin/bash" ]

debian12/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ WORKDIR /
5252
ENV LC_ALL=C.UTF-8
5353
ENV LANG=C.UTF-8
5454

55+
# Install Rustup
56+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
57+
ENV PATH="/root/.cargo/bin:${PATH}"
58+
5559
CMD [ "/bin/bash" ]

el7/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,8 @@ ENV LANG=en_US.UTF-8
101101
# merge the two dirs
102102
ENV ACLOCAL_PATH=/usr/share/aclocal:/usr/local/share/aclocal
103103

104+
# Install Rustup
105+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
106+
ENV PATH="/root/.cargo/bin:${PATH}"
107+
104108
CMD [ "/bin/bash" ]

0 commit comments

Comments
 (0)