enhance: more friendly to docker cache (#35792)

https://github.com/milvus-io/milvus/pull/35789

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
This commit is contained in:
yellow-shine 2024-08-30 13:05:34 +08:00 committed by GitHub
parent 1916aec67a
commit 41582a90ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 15 deletions

View File

@ -16,6 +16,10 @@ ARG TARGETARCH
RUN yum install -y wget libgomp libaio libatomic openblas-devel && \
rm -rf /var/cache/yum/*
# Add Tini
RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH && \
chmod +x /tini
COPY --chown=root:root --chmod=774 ./bin/ /milvus/bin/
COPY --chown=root:root --chmod=774 ./configs/ /milvus/configs/
@ -28,9 +32,6 @@ ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /milvus

View File

@ -7,6 +7,10 @@ RUN apt-get update && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Add Tini
RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH && \
chmod +x /tini
COPY --chown=root:root --chmod=774 ./bin/ /milvus/bin/
COPY --chown=root:root --chmod=774 ./configs/ /milvus/configs/
COPY --chown=root:root --chmod=774 ./lib/ /milvus/lib/
@ -16,9 +20,6 @@ ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /milvus

View File

@ -21,6 +21,10 @@ RUN dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled powertools && \
dnf -y install openblas-devel
# Add Tini
RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH && \
chmod +x /tini
COPY ./bin/ /milvus/bin/
COPY ./configs/ /milvus/configs/
@ -32,9 +36,6 @@ ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /milvus

View File

@ -18,6 +18,10 @@ RUN apt-get update && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Add Tini
RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH && \
chmod +x /tini
COPY --chown=root:root --chmod=774 ./bin/ /milvus/bin/
COPY --chown=root:root --chmod=774 ./configs/ /milvus/configs/
@ -29,9 +33,6 @@ ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /milvus/

View File

@ -18,6 +18,10 @@ RUN apt-get update && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Add Tini
RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH && \
chmod +x /tini
COPY --chown=root:root --chmod=774 ./bin/ /milvus/bin/
COPY --chown=root:root --chmod=774 ./configs/ /milvus/configs/
@ -29,9 +33,6 @@ ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true
# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /milvus/