This repository has the Dockerfile for a source build of gcc including gfortran. The default is the latest version of gcc 6.
The gcc6 branch builds latest gcc6, and the devel branch has the bleeding-edge trunk (currently gcc 8).
Corresponding auto-build docker available at
To make an interactive shell ready for compiling you local code at /local/code/source
docker run -v /local/code/source:/virtual/path -i -t cmbant/docker-gcc-build /bin/bash
Navigating into /virtual/path in the bash shell, you can then run make etc as normal, acting
on your local files.