From 277b8c4c27ad2eb3ce6db00f735e9399cc71cd4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 5 Jul 2021 23:44:50 +0300 Subject: [PATCH] Dockerfile: Upgrade the version of git bundled in the docker image This fixes the root cause for PR #210, differently. --- Dockerfile | 15 +++++++++++++++ Dockerfile.dev | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8f07841..bea40d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,21 @@ RUN cd /opt && \ mv cmake-* cmake ENV PATH=/opt/cmake/bin:$PATH +# Install a newer version of Git; the version of Git in Ubuntu 18.04 is +# said to have issues with submodules, see e.g. +# https://github.com/mstorsjo/llvm-mingw/pull/210#issuecomment-870104971 and +# https://github.com/mstorsjo/llvm-mingw/pull/210#issuecomment-873486503. +# This isn't needed for building LLVM itself, but makes the built Docker +# image more useful for use as image for building other projects. If updating +# to a newer distribution, this can be dropped. +RUN apt-get update -qq && \ + apt-get install -qqy --no-install-recommends software-properties-common && \ + add-apt-repository ppa:git-core/ppa && \ + apt-get update -qq && \ + apt-get upgrade -qqy git && \ + apt-get clean -y && \ + rm -rf /var/lib/apt/lists/* + RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost diff --git a/Dockerfile.dev b/Dockerfile.dev index ac92237..a635706 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -17,6 +17,21 @@ RUN cd /opt && \ mv cmake-* cmake ENV PATH=/opt/cmake/bin:$PATH +# Install a newer version of Git; the version of Git in Ubuntu 18.04 is +# said to have issues with submodules, see e.g. +# https://github.com/mstorsjo/llvm-mingw/pull/210#issuecomment-870104971 and +# https://github.com/mstorsjo/llvm-mingw/pull/210#issuecomment-873486503. +# This isn't needed for building LLVM itself, but makes the built Docker +# image more useful for use as image for building other projects. If updating +# to a newer distribution, this can be dropped. +RUN apt-get update -qq && \ + apt-get install -qqy --no-install-recommends software-properties-common && \ + add-apt-repository ppa:git-core/ppa && \ + apt-get update -qq && \ + apt-get upgrade -qqy git && \ + apt-get clean -y && \ + rm -rf /var/lib/apt/lists/* + RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost