Skip to content

Commit 1d59eea

Browse files
committed
fix(build): install Rust in the dnf-compat-layer build step
1 parent c62a9f6 commit 1d59eea

6 files changed

Lines changed: 24 additions & 48 deletions

File tree

‎build/alma9/Dockerfile.full‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ RUN microdnf --setopt=install_weak_deps=0 install -y \
88
glibc-devel.i686 libstdc++-devel.i686 \
99
&& microdnf clean all
1010

11-
# 安装Rust
12-
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
13-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
14-
&& rustup target add i686-unknown-linux-gnu
15-
1611
# 下载GeoIP数据库
1712
RUN mkdir -p /usr/local/share/GeoIP && \
1813
curl -fsSL -o /usr/local/share/GeoIP/GeoIP.dat.gz https://mailfud.org/geoip-legacy/GeoIP.dat.gz && \
1914
gunzip /usr/local/share/GeoIP/GeoIP.dat.gz
2015

21-
# 编译dnf-compat-layer
22-
# 安装Rust的层可能命中旧缓存,编译前先更新到最新stable
16+
# 安装Rust并编译dnf-compat-layer
17+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
2318
ARG DNF_COMPAT_LAYER_VERSION="0.3.0"
24-
RUN rustup update stable --no-self-update \
19+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
20+
&& rustup target add i686-unknown-linux-gnu \
2521
&& git clone --branch ${DNF_COMPAT_LAYER_VERSION} --depth 1 https://github.com/llnut/dnf-compat-layer.git /src \
2622
&& cd /src && cargo build --workspace --release --target i686-unknown-linux-gnu
2723

‎build/alma9/Dockerfile.server‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ RUN microdnf --setopt=install_weak_deps=0 install -y \
88
glibc-devel.i686 libstdc++-devel.i686 \
99
&& microdnf clean all
1010

11-
# 安装Rust
12-
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
13-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
14-
&& rustup target add i686-unknown-linux-gnu
15-
1611
# 下载GeoIP数据库
1712
RUN mkdir -p /usr/local/share/GeoIP && \
1813
curl -fsSL -o /usr/local/share/GeoIP/GeoIP.dat.gz https://mailfud.org/geoip-legacy/GeoIP.dat.gz && \
1914
gunzip /usr/local/share/GeoIP/GeoIP.dat.gz
2015

21-
# 编译dnf-compat-layer
22-
# 安装Rust的层可能命中旧缓存,编译前先更新到最新stable
16+
# 安装Rust并编译dnf-compat-layer
17+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
2318
ARG DNF_COMPAT_LAYER_VERSION="0.3.0"
24-
RUN rustup update stable --no-self-update \
19+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
20+
&& rustup target add i686-unknown-linux-gnu \
2521
&& git clone --branch ${DNF_COMPAT_LAYER_VERSION} --depth 1 https://github.com/llnut/dnf-compat-layer.git /src \
2622
&& cd /src && cargo build --workspace --release --target i686-unknown-linux-gnu
2723

‎build/debian13/Dockerfile.full‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99
ca-certificates curl gcc-multilib binutils git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
# 安装Rust
13-
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
14-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
15-
&& rustup target add i686-unknown-linux-gnu
16-
1712
# 下载GeoIP数据库
1813
RUN mkdir -p /usr/local/share/GeoIP && \
1914
curl -fsSL -o /usr/local/share/GeoIP/GeoIP.dat.gz https://mailfud.org/geoip-legacy/GeoIP.dat.gz && \
2015
gunzip /usr/local/share/GeoIP/GeoIP.dat.gz
2116

22-
# 编译dnf-compat-layer
23-
# 安装Rust的层可能命中旧缓存,编译前先更新到最新stable
17+
# 安装Rust并编译dnf-compat-layer
18+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
2419
ARG DNF_COMPAT_LAYER_VERSION="0.3.0"
25-
RUN rustup update stable --no-self-update \
20+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
21+
&& rustup target add i686-unknown-linux-gnu \
2622
&& git clone --branch ${DNF_COMPAT_LAYER_VERSION} --depth 1 https://github.com/llnut/dnf-compat-layer.git /src \
2723
&& cd /src && cargo build --workspace --release --target i686-unknown-linux-gnu
2824

‎build/debian13/Dockerfile.server‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99
ca-certificates curl gcc-multilib binutils git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
# 安装Rust
13-
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
14-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
15-
&& rustup target add i686-unknown-linux-gnu
16-
1712
# 下载GeoIP数据库
1813
RUN mkdir -p /usr/local/share/GeoIP && \
1914
curl -fsSL -o /usr/local/share/GeoIP/GeoIP.dat.gz https://mailfud.org/geoip-legacy/GeoIP.dat.gz && \
2015
gunzip /usr/local/share/GeoIP/GeoIP.dat.gz
2116

22-
# 编译dnf-compat-layer
23-
# 安装Rust的层可能命中旧缓存,编译前先更新到最新stable
17+
# 安装Rust并编译dnf-compat-layer
18+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
2419
ARG DNF_COMPAT_LAYER_VERSION="0.3.0"
25-
RUN rustup update stable --no-self-update \
20+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
21+
&& rustup target add i686-unknown-linux-gnu \
2622
&& git clone --branch ${DNF_COMPAT_LAYER_VERSION} --depth 1 https://github.com/llnut/dnf-compat-layer.git /src \
2723
&& cd /src && cargo build --workspace --release --target i686-unknown-linux-gnu
2824

‎build/ubuntu26/Dockerfile.full‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99
ca-certificates curl gcc-multilib binutils git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
# 安装Rust
13-
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
14-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
15-
&& rustup target add i686-unknown-linux-gnu
16-
1712
# 下载GeoIP数据库
1813
RUN mkdir -p /usr/local/share/GeoIP && \
1914
curl -fsSL -o /usr/local/share/GeoIP/GeoIP.dat.gz https://mailfud.org/geoip-legacy/GeoIP.dat.gz && \
2015
gunzip /usr/local/share/GeoIP/GeoIP.dat.gz
2116

22-
# 编译dnf-compat-layer
23-
# 安装Rust的层可能命中旧缓存,编译前先更新到最新stable
17+
# 安装Rust并编译dnf-compat-layer
18+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
2419
ARG DNF_COMPAT_LAYER_VERSION="0.3.0"
25-
RUN rustup update stable --no-self-update \
20+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
21+
&& rustup target add i686-unknown-linux-gnu \
2622
&& git clone --branch ${DNF_COMPAT_LAYER_VERSION} --depth 1 https://github.com/llnut/dnf-compat-layer.git /src \
2723
&& cd /src && cargo build --workspace --release --target i686-unknown-linux-gnu
2824

‎build/ubuntu26/Dockerfile.server‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99
ca-certificates curl gcc-multilib binutils git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
# 安装Rust
13-
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
14-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
15-
&& rustup target add i686-unknown-linux-gnu
16-
1712
# 下载GeoIP数据库
1813
RUN mkdir -p /usr/local/share/GeoIP && \
1914
curl -fsSL -o /usr/local/share/GeoIP/GeoIP.dat.gz https://mailfud.org/geoip-legacy/GeoIP.dat.gz && \
2015
gunzip /usr/local/share/GeoIP/GeoIP.dat.gz
2116

22-
# 编译dnf-compat-layer
23-
# 安装Rust的层可能命中旧缓存,编译前先更新到最新stable
17+
# 安装Rust并编译dnf-compat-layer
18+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH="/usr/local/cargo/bin:${PATH}"
2419
ARG DNF_COMPAT_LAYER_VERSION="0.3.0"
25-
RUN rustup update stable --no-self-update \
20+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \
21+
&& rustup target add i686-unknown-linux-gnu \
2622
&& git clone --branch ${DNF_COMPAT_LAYER_VERSION} --depth 1 https://github.com/llnut/dnf-compat-layer.git /src \
2723
&& cd /src && cargo build --workspace --release --target i686-unknown-linux-gnu
2824

0 commit comments

Comments
 (0)