Add a C++ friendly docker build file

This takes an existing cross-friendly image and adds cmake, ninja, cargo,
and rust. It also enables dlopen linkage for the compiler.
This commit is contained in:
Simon Hausmann 2023-01-02 15:33:47 +01:00
parent 3bc95fd1cc
commit 83f25b200a
2 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,21 @@
ARG arch
FROM ghcr.io/slint-ui/slint/$arch
ARG arch
RUN apt-get update && \
apt-get install --assume-yes gpg wget && \
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
apt-get update && \
apt-get install --assume-yes cmake ninja-build make && \
rm -rf /var/lib/apt/lists/*
ENV RUSTUP_HOME=/rust
ENV CARGO_HOME=/cargo
ENV PATH=/cargo/bin:/rust/bin:$PATH
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN rustup target add $arch
ENV RUST_FONTCONFIG_DLOPEN=on