4jcraft/.devcontainer/Dockerfile
ViniciusCruzMoura 1e94adb190 Dockerfile: upgrade GCC to 15
replace gcc-14/g++-14 with gcc-15/g++-15 and change update-alternatives
to make gcc 15 the default,
this fixes compiler errors caused by use of c++23 (flat_map)
which require gcc 15+

Signed-off-by: ViniciusCruzMoura <contato.cruz.moura@gmail.com>
2026-04-08 02:09:54 -05:00

33 lines
1.1 KiB
Docker

FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get update \
&& apt-get install -y \
build-essential \
gcc-15 g++-15 \
python3 \
ninja-build \
libsdl2-dev \
libgl-dev \
libglu1-mesa-dev \
libpthread-stubs0-dev \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 100 \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN MESON_VERSION=1.10.2 \
&& wget -qO meson.tar.gz https://github.com/mesonbuild/meson/releases/latest/download/meson-${MESON_VERSION}.tar.gz \
&& mkdir /opt/meson \
&& tar xf meson.tar.gz --strip-components=1 -C /opt/meson \
&& mv /opt/meson/meson.py /opt/meson/meson \
&& ln -s /opt/meson/meson /usr/bin/meson \
&& rm -rf meson.tar.gz
ENV DEBIAN_FRONTEND=dialog