enhance: specify version while rust-init (#29108)

This will reduce the size of builder image.
/kind improvement

---------

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
pull/29149/head
Jiquan Long 2023-12-12 22:10:41 +08:00 committed by GitHub
parent 520c07ec9d
commit 4651f89944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 10 deletions

View File

@ -23,8 +23,9 @@ RUN pip3 install conan==1.61.0
RUN echo "target arch $TARGETARCH"
RUN wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local
# https://github.com/microsoft/vcpkg/pull/35084
RUN mkdir /opt/vcpkg && \
wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/master.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \
wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/refs/tags/2023.11.20.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \
rm -rf vcpkg.tar.gz
ENV VCPKG_FORCE_SYSTEM_BINARIES 1
@ -48,11 +49,9 @@ RUN mkdir -p /home/milvus/.vscode-server/extensions \
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
sh -s -- --default-toolchain=1.73 -y
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup install 1.73 && rustup default 1.73
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]

View File

@ -53,11 +53,9 @@ RUN mkdir -p /home/milvus/.vscode-server/extensions \
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
sh -s -- --default-toolchain=1.73 -y
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup install 1.73 && rustup default 1.73
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]

View File

@ -87,11 +87,9 @@ RUN wget -O /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini
chmod +x /tini
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
sh -s -- --default-toolchain=1.73 -y
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup install 1.73 && rustup default 1.73
ENTRYPOINT [ "/tini", "--", "autouseradd", "--user", "milvus", "--", "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]