Optimize Milvus Distributed Dockerfile

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
quicksilver 2021-02-27 10:51:52 +08:00 committed by yefu.chen
parent 966cf42b54
commit f853ddc030

View File

@ -14,6 +14,10 @@ FROM milvusdb/milvus-distributed-dev:amd64-ubuntu18.04-latest AS openblas
#FROM alpine
FROM ubuntu:bionic-20200921
RUN apt-get update && apt-get install -y --no-install-recommends libtbb-dev gfortran && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Add Tini
ENV TINI_VERSION v0.19.0
@ -21,10 +25,6 @@ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
RUN apt-get update && apt-get install -y --no-install-recommends libtbb-dev gfortran
COPY --from=openblas /usr/lib/libopenblas-r0.3.9.so /usr/lib/
RUN ln -s /usr/lib/libopenblas-r0.3.9.so /usr/lib/libopenblas.so.0 && \
@ -38,4 +38,6 @@ COPY ./lib/ /milvus-distributed/lib/
ENV LD_LIBRARY_PATH=/milvus-distributed/lib:$LD_LIBRARY_PATH:/usr/lib
ENTRYPOINT ["/tini", "--"]
WORKDIR /milvus-distributed/