Last active
January 10, 2025 10:43
-
-
Save bjconlan/c1db1ce7129610b9711db4bfebe1e60a to your computer and use it in GitHub Desktop.
building zig devcontainer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Zig", | |
"dockerFile": "Dockerfile", | |
"settings": {}, | |
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined", "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z" ], | |
"workspaceMount": "", | |
"remoteUser": "vscode", | |
"features": { | |
"git": "os-provided" | |
}, | |
"postStartCommand": "mkdir -p build && cd build && cmake .. -DCMAKE_PREFIX_PATH=/usr/lib/llvm-15 && make", | |
"extensions": [ | |
"ms-vscode.cmake-tools", | |
"llvm-vs-code-extensions.vscode-clangd" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/vscode/devcontainers/base:0-bullseye | |
RUN echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main" >> /etc/apt/sources.list\ | |
&& curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -\ | |
&& apt-get update\ | |
&& apt-get -y install --no-install-recommends\ | |
llvm-15-dev\ | |
libclang-15-dev\ | |
clang-15\ | |
liblld-15-dev\ | |
zlib1g-dev \ | |
cmake\ | |
make\ | |
gdb\ | |
strace\ | |
valgrind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A more generic 'non devcontainer' dockerfile for llvm-${VERSION} builds of zig: