docker: Upgrade to Ubuntu 20.04
Ubuntu 20.04 comes with CMake 3.16, so there's no need to install a custom version of CMake for now (for LLVM 16.x; LLVM 17 will have the requirement raised to CMake 3.20 though). Also drop the workaround for git issues in the old version in Ubuntu 18.04. The latest releases that are built on GitHub Actions without docker are based on Ubuntu 20.04 anyway, so there's less demand for building this with an older version for the sake of compatibility of the built binaries. For users using the built docker image as such, having it based on a newer base distribution is beneficial.
This commit is contained in:
1 parent
64b27a1c56
commit
5d63c28d85
3 files changed
+7
-57
No files matched your search
+3
-28
@@ -1,38 +1,13 @@
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends \
|
||||
RUN apt-get update -qq && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \
|
||||
git wget bzip2 file unzip libtool pkg-config cmake build-essential \
|
||||
automake yasm gettext autopoint vim-tiny python3 python3-distutils \
|
||||
ninja-build ca-certificates curl less zip && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Manually install a newer version of CMake; this is needed since building
|
||||
# LLVM requires CMake 3.13.4, while Ubuntu 18.04 ships with 3.10.2. If
|
||||
# updating to a newer distribution, this can be dropped.
|
||||
RUN cd /opt && \
|
||||
curl -LO https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-Linux-$(uname -m).tar.gz && \
|
||||
tar -zxf cmake-*.tar.gz && \
|
||||
rm cmake-*.tar.gz && \
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user