From 4a8b9ea58b720d969573a4e292c9dacbda8a8ea5 Mon Sep 17 00:00:00 2001 From: Shishu the Dragon <183069616+ShishuTheDragon@users.noreply.github.com> Date: Fri, 4 Jul 2025 22:25:35 +1200 Subject: [PATCH] devcontainer: Fix `aarch64` and layering (#677) --- .devcontainer/Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2af3c436..c71cd98e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,20 +4,23 @@ WORKDIR /app # avoid errors/configuration issues while installing other packages ARG DEBIAN_FRONTEND=noninteractive ARG TZ=Etc/UTC -RUN apt update -RUN apt install -y tzdata +RUN apt update && apt install -y tzdata # install git for collaboration management -RUN apt install -y git +RUN apt update && apt install -y git # install dependencies for building and running the project -RUN apt install -y ccache cmake curl less libncurses6 libssl-dev llvm ninja-build pip pkg-config python3 +RUN apt update && apt install -y ccache cmake curl less libncurses6 libssl-dev ninja-build pip pkg-config python3 RUN pip install --break-system-packages capstone colorama cxxfilt pyelftools python-Levenshtein toml watchdog # install dependencies for code environment -RUN apt install -y clangd clang-format +RUN apt update && apt install -y clangd clang-format llvm # install (outdated) libtinfo5, required for old clang version -RUN curl -o libtinfo5_6.3-2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb && dpkg -i libtinfo5_6.3-2_amd64.deb && rm -f libtinfo5_6.3-2_amd64.deb +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + curl -o libtinfo5_6.3-2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb && \ + dpkg -i libtinfo5_6.3-2_amd64.deb && \ + rm -f libtinfo5_6.3-2_amd64.deb; \ + fi ENTRYPOINT ["bash"]