Skip to content

Commit

Permalink
enhance: friendly for docker cache
Browse files Browse the repository at this point in the history
Signed-off-by: Yellow Shine <[email protected]>
  • Loading branch information
yellow-shine committed Aug 29, 2024
1 parent 1cd9123 commit 0f28591
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
7 changes: 4 additions & 3 deletions build/docker/milvus/amazonlinux2023/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
7 changes: 4 additions & 3 deletions build/docker/milvus/gpu/ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions build/docker/milvus/rockylinux8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
7 changes: 4 additions & 3 deletions build/docker/milvus/ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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/
7 changes: 4 additions & 3 deletions build/docker/milvus/ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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/

0 comments on commit 0f28591

Please sign in to comment.