Update Dockerfile for updating gcc version (#3606)
author채성우/On-Device Lab(SR)/Engineer/삼성전자 <sw4670.chae@samsung.com>
Mon, 27 May 2019 10:35:58 +0000 (19:35 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 27 May 2019 10:35:58 +0000 (19:35 +0900)
* Update Dockerfile for updating gcc version

This commit updates Dockerfile for updating gcc version.

Related issue:#3332

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
* This commit remove some unnecessary codes.

* This commit modify codes for consistency

Dockerfile

index 2bcbdb8..7da738d 100644 (file)
@@ -11,14 +11,22 @@ RUN if [ -n "$UBUNTU_MIRROR" ] ; then sed "s/archive.ubuntu.com/${UBUNTU_MIRROR}
 RUN apt update
 
 # Install 'add-apt-repository'
-RUN apt-get install -y software-properties-common
+RUN apt install -y software-properties-common
 
 # Add CMake 3.2 PPA
 RUN add-apt-repository -y ppa:george-edison55/cmake-3.x
+RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
 RUN apt update
 
 # Install base dependencies
-RUN apt install -y make cmake g++
+RUN apt install -y make cmake
+
+# Update gcc version
+RUN apt install -y gcc-5 g++-5
+RUN update-alternatives \
+             --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 \
+             --slave /usr/bin/g++ g++ /usr/bin/g++-5
+RUN update-alternatives --config gcc
 
 # Install google test (source)
 RUN apt install -y libgtest-dev