diff --git a/tools/docker/build-and-push-images.sh b/tools/docker/build-and-push-images.sh index af0057ca4..34d260507 100755 --- a/tools/docker/build-and-push-images.sh +++ b/tools/docker/build-and-push-images.sh @@ -1,9 +1,12 @@ #!/bin/sh -# Please run from the directory this file in -docker pull ubuntu:18.04 -docker build -t jevolk/construct:ubuntu-18.04 ./ubuntu/base -docker build -t jevolk/construct:ubuntu-18.04-clang-9 ./ubuntu/clang-9 -docker build -t jevolk/construct:ubuntu-18.04-gcc-8 ./ubuntu/gcc-8 +BASEDIR=$(dirname "$0") -docker push jevolk/construct:ubuntu-18.04-clang-9 -docker push jevolk/construct:ubuntu-18.04-gcc-8 +docker pull ubuntu:18.04 +docker build -t jevolk/construct:ubuntu-18.04 $BASEDIR/ubuntu/base +docker build -t jevolk/construct:ubuntu-18.04-clang-9 $BASEDIR/ubuntu/clang-9 +docker build -t jevolk/construct:ubuntu-18.04-gcc-8 $BASEDIR/ubuntu/gcc-8 +docker build -t jevolk/construct:ubuntu-18.04-gcc-9 $BASEDIR/ubuntu/gcc-9 + +#docker push jevolk/construct:ubuntu-18.04-clang-9 +#docker push jevolk/construct:ubuntu-18.04-gcc-8 +#docker push jevolk/construct:ubuntu-18.04-gcc-9 diff --git a/tools/docker/ubuntu/base/Dockerfile b/tools/docker/ubuntu/base/Dockerfile index 65616cfef..80f0324a8 100644 --- a/tools/docker/ubuntu/base/Dockerfile +++ b/tools/docker/ubuntu/base/Dockerfile @@ -1,5 +1,7 @@ FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive + RUN \ apt-get update && \ apt-get install --no-install-recommends -y software-properties-common && \ diff --git a/tools/docker/ubuntu/gcc-9/Dockerfile b/tools/docker/ubuntu/gcc-9/Dockerfile new file mode 100644 index 000000000..8c64776df --- /dev/null +++ b/tools/docker/ubuntu/gcc-9/Dockerfile @@ -0,0 +1,12 @@ +FROM jevolk/construct:ubuntu-18.04 + +ENV CXX g++-9 +ENV CC gcc-9 + +RUN apt-get update \ + && apt-get install --no-install-recommends -y software-properties-common \ + && add-apt-repository ppa:jonathonf/gcc-9.2 \ + && apt-get update \ + && apt-get install --no-install-recommends -y g++- gcc-9 \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/*