Fix Docker build layout.
This commit is contained in:
1 parent
e38e584984
commit
f7466a0ac2
4 files changed
+25
-46
No files matched your search
+23
-2
@@ -1,4 +1,25 @@
|
||||
FROM ubuntu:18.04 AS grte
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends build-essential gawk bison python3 git texinfo ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# GRTE v5 source, Google's glibc 2.27
|
||||
RUN git clone --depth 1 https://third-party-mirror.googlesource.com/GRTEv5 /src
|
||||
|
||||
# Build the libraries into the library directory searched by the GRTE v5 loader
|
||||
WORKDIR /build
|
||||
RUN printf 'slibdir=/usr/grte/v5/lib64\nrtlddir=/usr/grte/v5/lib64\n' > configparms \
|
||||
&& /src/google3/third_party/grte/v5_src/glibc-2.27/configure \
|
||||
--prefix=/usr/grte/v5 \
|
||||
--libdir=/usr/grte/v5/lib64 \
|
||||
--disable-werror \
|
||||
--enable-kernel=3.2 \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install DESTDIR=/out
|
||||
|
||||
FROM gcr.io/cloud-ingest/tsop-agent:latest
|
||||
|
||||
# GRTE v5 shared libraries built by build-grte.sh, matching the GRTE v5 glibc the launcher is statically linked with.
|
||||
COPY grte/usr/grte/v5/lib64/ /usr/grte/v5/lib64/
|
||||
# GRTE v5 shared libraries matching the GRTE v5 glibc the launcher is statically linked with.
|
||||
COPY --from=grte /out/usr/grte/v5/lib64/ /usr/grte/v5/lib64/
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
prefix=/usr/grte/v5
|
||||
libdir="${prefix}/lib64"
|
||||
|
||||
# Install the build tools
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq --no-install-recommends build-essential gawk bison python3 git texinfo ca-certificates > /dev/null
|
||||
|
||||
# Get the GRTE v5 source, Google's glibc 2.27
|
||||
git clone --depth 1 https://third-party-mirror.googlesource.com/GRTEv5 /src
|
||||
|
||||
# Build the libraries in the library directory searched by the GRTE v5 loader
|
||||
mkdir /build
|
||||
cd /build
|
||||
cat > configparms <<EOF
|
||||
slibdir=${libdir}
|
||||
rtlddir=${libdir}
|
||||
EOF
|
||||
/src/google3/third_party/grte/v5_src/glibc-2.27/configure \
|
||||
--prefix="${prefix}" \
|
||||
--libdir="${libdir}" \
|
||||
--disable-werror \
|
||||
--enable-kernel=3.2
|
||||
make -j"$(nproc)"
|
||||
make install DESTDIR=/out
|
||||
|
||||
ls -l "/out${libdir}/libc.so.6" "/out${libdir}/libm.so.6" "/out${libdir}/libpthread.so.0" "/out${libdir}/ld-linux-x86-64.so.2"
|
||||
Reference in new issue
Block a user