title: how to install gcc7 in docker centos7
body: <p>I am trying to build an docker image based on <code>centos7</code></p>
  
  <pre><code>FROM centos:centos7
  
  RUN yum -y update
  RUN yum -y install gcc
  RUN gcc --version
  </code></pre>
  
  <p>the installed <code>gcc</code> is 4.8:</p>
  
  <p>Step</p>
  
  <pre><code> 4/4 : RUN gcc --version
   ---&gt; Running in 70b9aa4a1f67
  gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
  Copyright (C) 2015 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  </code></pre>
  
  <p>How can I install gcc7? I tried devtools-7, it does not work:</p>
  
  <pre><code>FROM centos:centos7
  
  RUN yum -y update
  RUN yum -y install scl-utils
  RUN yum -y install devtoolset-7-gcc
  RUN scl enable devtoolset-7 bash
  RUN gcc --version
  </code></pre>
  
  <p>I got:</p>
  
  <pre><code>Step 4/6 : RUN yum -y install devtoolset-7-gcc
   ---&gt; Running in 85b49f411d4c
  Loaded plugins: fastestmirror, ovl
  Loading mirror speeds from cached hostfile
   * base: mirror.imt-systems.com
   * extras: mirror.23media.com
   * updates: ftp.plusline.net
  No package devtoolset-7-gcc available.
  Error: Nothing to do
  The command '/bin/sh -c yum -y install devtoolset-7-gcc' returned a non-zero code: 1
  </code></pre>