Skip to content
4 changes: 4 additions & 0 deletions build_container/Dockerfile-centos
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ COPY ./build_container_common.sh /
COPY ./build_container_centos.sh /

ENV PATH /opt/rh/rh-git218/root/usr/bin:/opt/rh/devtoolset-7/root/usr/bin:/opt/llvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

RUN mkdir /etc/sudoers.d
RUN echo "Defaults secure_path = $PATH" > /etc/sudoers.d/path

RUN ./build_container_centos.sh
ENV LC_ALL en_US.UTF-8

Expand Down
19 changes: 18 additions & 1 deletion build_container/build_container_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
yum update -y
yum install -y devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils java-1.8.0-openjdk-headless jq rsync \
rh-git218 wget unzip which make cmake3 patch ninja-build devtoolset-9-libatomic-devel openssl python27 \
libtool autoconf tcpdump graphviz doxygen sudo
libtool autoconf tcpdump graphviz doxygen sudo glibc-static libstdc++-static

# set locale
localedef -c -f UTF-8 -i en_US en_US.UTF-8
Expand Down Expand Up @@ -54,4 +54,21 @@ fi

source ./build_container_common.sh

# compile proper version of gn, compatible with CentOS's GLIBC version and
# envoy wasm/v8 dependency
# can be removed when the dependency will be updated
git clone https://gn.googlesource.com/gn
pushd gn
# 45aa842fb41d79e149b46fac8ad71728856e15b9 is a hash of the version
# before https://gn.googlesource.com/gn/+/46b572ce4ceedfe57f4f84051bd7da624c98bf01
# as this commit expects envoy to rely on newer version of wasm/v8 with the fix
# from https://github.com/v8/v8/commit/eac21d572e92a82f5656379bc90f8ecf1ff884fc
# (versions 9.5.164 - 9.6.152)
git checkout 45aa842fb41d79e149b46fac8ad71728856e15b9
python build/gen.py
ninja -C out
mv -f out/gn /usr/local/bin/gn
chmod +x /usr/local/bin/gn
popd

yum clean all