From 41582a90ad905143903e31ec07611e8d2873782b Mon Sep 17 00:00:00 2001 From: yellow-shine Date: Fri, 30 Aug 2024 13:05:34 +0800 Subject: [PATCH] enhance: more friendly to docker cache (#35792) https://github.com/milvus-io/milvus/pull/35789 Signed-off-by: Yellow Shine --- build/docker/milvus/amazonlinux2023/Dockerfile | 7 ++++--- build/docker/milvus/gpu/ubuntu22.04/Dockerfile | 7 ++++--- build/docker/milvus/rockylinux8/Dockerfile | 7 ++++--- build/docker/milvus/ubuntu20.04/Dockerfile | 7 ++++--- build/docker/milvus/ubuntu22.04/Dockerfile | 7 ++++--- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/build/docker/milvus/amazonlinux2023/Dockerfile b/build/docker/milvus/amazonlinux2023/Dockerfile index 4ff24dfb45..2f0b01abf5 100644 --- a/build/docker/milvus/amazonlinux2023/Dockerfile +++ b/build/docker/milvus/amazonlinux2023/Dockerfile @@ -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 diff --git a/build/docker/milvus/gpu/ubuntu22.04/Dockerfile b/build/docker/milvus/gpu/ubuntu22.04/Dockerfile index fc6a74f547..c045c357fa 100644 --- a/build/docker/milvus/gpu/ubuntu22.04/Dockerfile +++ b/build/docker/milvus/gpu/ubuntu22.04/Dockerfile @@ -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 diff --git a/build/docker/milvus/rockylinux8/Dockerfile b/build/docker/milvus/rockylinux8/Dockerfile index 0862e215e8..1fe43ae1ff 100644 --- a/build/docker/milvus/rockylinux8/Dockerfile +++ b/build/docker/milvus/rockylinux8/Dockerfile @@ -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 diff --git a/build/docker/milvus/ubuntu20.04/Dockerfile b/build/docker/milvus/ubuntu20.04/Dockerfile index 670f89b3d2..6d43668c88 100644 --- a/build/docker/milvus/ubuntu20.04/Dockerfile +++ b/build/docker/milvus/ubuntu20.04/Dockerfile @@ -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/ diff --git a/build/docker/milvus/ubuntu22.04/Dockerfile b/build/docker/milvus/ubuntu22.04/Dockerfile index 40a4e9e0fa..44999ad1a8 100644 --- a/build/docker/milvus/ubuntu22.04/Dockerfile +++ b/build/docker/milvus/ubuntu22.04/Dockerfile @@ -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/