[VOL-3797] : Set default g++ and gcc version to 4.9 in openolt-test docker image
Change-Id: Ic49a10dcd62fd22957be999ee7b2e6fbfe5f1662
diff --git a/docker/Dockerfile.openolt-test b/docker/Dockerfile.openolt-test
index d05a2ec..ebf8863 100644
--- a/docker/Dockerfile.openolt-test
+++ b/docker/Dockerfile.openolt-test
@@ -24,12 +24,12 @@
clang=1:3.8-33ubuntu3.1 \
libc++-dev=3.7.0-1ubuntu0.1 \
unzip=6.0-20ubuntu1 \
- libssl-dev=1.0.2g-1ubuntu4.17 \
+ libssl-dev=1.0.2g-1ubuntu4.18 \
gawk=1:4.1.3+dfsg-0.1 \
debhelper=9.20160115ubuntu3 \
dh-systemd=1.29ubuntu4 \
init-system-helpers=1.29ubuntu4 \
- curl=7.47.0-1ubuntu2.16 \
+ curl=7.47.0-1ubuntu2.18 \
ccache=3.2.4-1 \
g++-4.9=4.9.3-13ubuntu2 \
wget=1.17.1-1ubuntu1.5 \
@@ -40,6 +40,10 @@
apt-get clean && \
rm -rf /var/lib/apt/lists/*
+# Set g++-4.9 and gcc-4.9 as the default versions
+RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20 &&\
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
+
# Install cmake (need cmake version 3.15.0 or later to compile grpc c++ 1.31.1)
RUN wget -q -O cmake-linux.sh https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh && \
sh cmake-linux.sh -- --skip-license && rm cmake-linux.sh