Skip to content

Commit

Permalink
Update dockerfile for ubuntu 20.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurtron committed Nov 27, 2024
1 parent 8d444ca commit c39b874
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docker-build-v2/amd64-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# We pick ubuntu 18 instead of newer one because we are dynamically linking
# to glibc and a few other libraries and we want to keep compatibility for as
# many users as possible.
FROM docker.io/ubuntu:18.04
FROM docker.io/ubuntu:20.04
ENV ENGINE_PLATFORM=amd64-linux

RUN apt-get update \
Expand All @@ -10,12 +10,14 @@ RUN apt-get update \
&& apt-get update \
&& apt-get install --no-install-recommends --yes \
curl gcc-13 g++-13 git ninja-build curl p7zip-full python3-pip python3-setuptools \
libsdl2-dev libopenal-dev libfreetype6-dev libfontconfig1-dev \
libsdl2-dev libopenal-dev libfreetype6-dev libfontconfig1-dev xz-utils make uuid-dev \
&& apt-get remove --purge --yes software-properties-common \
&& apt-get autoremove --purge --yes \
&& apt-get upgrade --yes \
&& rm -rf /var/lib/apt/lists/*



# We need a newer ccache for compression support
ARG CCACHE_VERSION="4.10.2"
RUN curl -L -O https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-x86_64.tar.xz \
Expand All @@ -39,12 +41,15 @@ WORKDIR /build
RUN mkdir src cache out artifacts && chmod a+rwx cache out artifacts

# Fetch library dependencies and configure resolution
RUN git clone --depth=1 https://github.com/beyond-all-reason/spring-static-libs.git -b 18.04 spring-static-libs
RUN git clone --depth=1 https://github.com/beyond-all-reason/spring-static-libs.git -b 20.04 spring-static-libs
ENV PKG_CONFIG_LIBDIR=/build/spring-static-libs/lib/pkgconfig
ENV PKG_CONFIG="pkg-config --define-prefix --static"
ENV CMAKE_PREFIX_PATH=/build/spring-static-libs/
ENV PREFER_STATIC_LIBS=TRUE

# Fontconfig cmake doesn't seem to be properly setup
RUN sed -i 's/ IMPORTED_LOCATION "\${Fontconfig_LIBRARY}"/&\n INTERFACE_LINK_LIBRARIES "\/usr\/lib\/x86_64-linux-gnu\/libuuid\.a"/' /usr/local/lib/python3.8/dist-packages/cmake/data/share/cmake-3.27/Modules/FindFontconfig.cmake

# Set up default cmake toolchain
COPY toolchain.cmake .
ENV CMAKE_TOOLCHAIN_FILE=/build/toolchain.cmake
Expand Down

0 comments on commit c39b874

Please sign in to comment.