The Docker image contains the OS and dependencies to produce a standalone copy of GCC, written to the current working directory.
Quick Install
$ curl -sL https://gist.githubusercontent.com/mottosso/73acaa883cd0442176e646b084117e1e/raw/shell.sh | bash -
$ gcc --version
# gcc (GCC) 4.8.3
# Copyright (C) 2013 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.
Manual Install
$ git clone https://gist.github.com/73acaa883cd0442176e646b084117e1e.git build-gcc
$ cd build-gcc
$ docker build -t mottosso/scientific:6.6 .
$ docker run -ti --rm -v $(pwd):/home/root mottosso/scientific:6.6 bash build.sh
$ export PATH=$(pwd)/gcc-4.8.3/bin
$ gcc --version
# gcc (GCC) 4.8.3
# Copyright (C) 2013 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.