Add devcontainer for debugging with latest build tools

Provides a sandboxed Ubuntu 24.04 environment with LLVM 21
(clang, clangd, lld, lldb, libc++), cmake, ninja, and ccache
for building and debugging the decompiler with up-to-date tooling.

While there are only minimal VSCode extensions installed by default, I
automatically install Claude Code and my own dotfiles plus additional tools
This commit is contained in:
Eric Kilmer
2026-02-25 16:15:18 +00:00
parent fbefd7d828
commit eb980ff91d
2 changed files with 56 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV LLVM_VERSION=21
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
wget \
software-properties-common \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main" \
> /etc/apt/sources.list.d/llvm.list \
&& apt-get update && apt-get install -y \
clang-${LLVM_VERSION} \
clangd-${LLVM_VERSION} \
lld-${LLVM_VERSION} \
llvm-${LLVM_VERSION}-dev \
libclang-${LLVM_VERSION}-dev \
libc++-${LLVM_VERSION}-dev \
libc++abi-${LLVM_VERSION}-dev \
lldb-${LLVM_VERSION} \
cmake \
ninja-build \
git \
zlib1g-dev \
ccache \
doxygen \
graphviz \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/lld lld /usr/bin/lld-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-${LLVM_VERSION} 100 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
+19
View File
@@ -0,0 +1,19 @@
{
"name": "sleigh",
"build": {
"dockerfile": "Dockerfile"
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt=seccomp=unconfined",
"--privileged"
],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cmake-tools",
"llvm-vs-code-extensions.vscode-clangd",
]
}
}
}