/docker-gcc

Dockerfiles for GCC

Primary LanguageMakefile

Layers Version Commit Docker Pulls Automated Build

Supported tags

  • 9.2.0
  • 8.3.0
  • 7.3.0
  • 5.5.0

How to use

  1. Install docker engine

  2. Pull the image

docker pull leavesask/gcc:<tag>
  1. Run the image interactively
docker run -it --rm leavesask/gcc:<tag>

How to build

The base image is spack.

make

There are a bunch of build-time arguments you can use to build the image.

It is highly recommended that you build the image with make.

# Build an image for GCC 9.2.0
make GCC_VERSION="9.2.0"

# Build and publish the image
make release GCC_VERSION="9.2.0"

Check Makefile for more options.

docker build

As an alternative, you can build the image with docker build command.

docker build \
        --build-arg SPACK_IMAGE="spack/ubuntu-bionic" \
        --build-arg SPACK_VERSION="0.14" \
        --build-arg GCC_VERSION="9.2.0" \
        --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
        --build-arg VCS_REF=`git rev-parse --short HEAD` \
        -t my-repo/gcc:latest .

Arguments and their defaults are listed below.

  • GCC_VERSION: The version of GCC supported by spack (defaults to 9.2.0)