COPY --from=
从第一阶段复制库文件的命令
/usr/local/lib/libproto*
到当前图像的。
我看到的问题是,第一个映像包含从通用库文件名到特定版本文件名的符号链接。AFAIK这是Debian和许多其他Linux系统中的常见做法。码头工人
COPY
apt-get
命令
ldconfig: /usr/local/lib/libprotobuf.so.17 is not a symbolic link
.
#Compile any tools we cannot install from packages
FROM gcc:7 as builder
USER 0
RUN \
apt-get -y update && \
apt-get -y install \
clang \
libc++-dev \
libgflags-dev \
libgtest-dev
RUN \
# Protocol Buffer & gRPC
# install protobuf first, then grpc
git clone -b $(curl -L https://grpc.io/release) \
https://github.com/grpc/grpc /var/local/git/grpc && \
cd /var/local/git/grpc && \
git submodule update
echo "--- installing protobuf ---" && \
cd third_party/protobuf && \
./autogen.sh && ./configure
make -j$(nproc) && make install && make clean && ldconfig && \
echo "--- installing grpc ---" && \
cd /var/local/git/grpc && \
make -j$(nproc) && make install && make clean && ldconfig
FROM debian
LABEL \
Description="Basic Debian production environment with a number of libraries configured" \
MAINTAINER="Mr Me"
ARG prefix=/usr/local
ARG binPath=$prefix/bin
ARG libPath=$prefix/lib
# Copy over pre-made tools
# Protocol Buffer
COPY
# gRPC
COPY
COPY
COPY
RUN ldconfig
# Install remaining tools using apt-get
RUN apt-get -y update && \
apt-get -y install \
libhdf5-dev \
libssl1.1 \
uuid-dev;
如您所见,我正在尝试将gRPC和protocolbuffer的最新版本添加到基于Debian的运行时映像中。