diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b97d9efad..bb631ce86 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -12,7 +12,6 @@ RUN apt-get update \ gcc-14 g++-14 \ python3 \ ninja-build \ - meson \ libsdl2-dev \ libgl-dev \ libglu1-mesa-dev \ @@ -25,4 +24,13 @@ RUN apt-get update \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +# Use the latest version of Meson -> $(curl -s "https://api.github.com/repos/mesonbuild/meson/releases/latest" | grep -Po '"tag_name": "\K[0-9.]+') +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 diff --git a/README.md b/README.md index 94eae8f9b..73f7bd60d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,11 @@ Alternatively, you can build and use the container manually: ```bash docker build -t 4jcraft-dev .devcontainer/ -docker run -it -v $(pwd):/workspaces/4jcraft -w /workspaces/4jcraft 4jcraft-dev bash +docker run -it --rm -v $(pwd):/workspaces/4jcraft -w /workspaces/4jcraft 4jcraft-dev bash +``` +(Optional) Clean up the Docker image +```bash +docker rmi 4jcraft-dev --force ``` ### Configure & Build