-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pending changes exported from your codespace
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-22.04 | ||
|
||
# Install latest cmake | ||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | ||
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null | ||
RUN sudo apt-get update && sudo apt-get install -y cmake | ||
|
||
# Install pre-commit | ||
RUN sudo apt-get install -y python3-pip && pip3 install pre-commit | ||
RUN pre-commit && pre-commit install | ||
|
||
# Avoid ASAN Stalling | ||
# Alternative is to update to clang-18 and | ||
RUN sudo sysctl -w vm.mmap_rnd_bits=28 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt-get update | ||
|
||
# Install build tools | ||
RUN apt-get install -y git | ||
RUN apt-get install -y gcc-14 && ln -s /usr/bin/gcc-14 /usr/bin/gcc | ||
RUN apt-get install -y g++-14 && ln -s /usr/bin/g++-14 /usr/bin/g++ | ||
RUN apt-get install -y clang-18 && ln -s /usr/bin/clang++-18 /usr/bin/clang++ && ln -s /usr/bin/clang-18 /usr/bin/clang | ||
|
||
# Install CMake | ||
RUN apt-get install -y ca-certificates gpg wget | ||
RUN test -f /usr/share/doc/kitware-archive-keyring/copyright || \ | ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | ||
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null | ||
RUN apt-get update | ||
RUN apt-get install -y kitware-archive-keyring | ||
RUN apt-get install -y cmake | ||
|
||
# Install Ninja | ||
RUN apt-get install -y ninja-build | ||
|
||
# Disable safe directory | ||
RUN git config --global --add safe.directory '*' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp | ||
|
||
// TODO: update gcc and clang to avoid address randomziation problem. | ||
|
||
{ | ||
"name": "C++", | ||
// "image": "mcr.microsoft.com/devcontainers/cpp:ubuntu", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
// "features": { | ||
// // "ghcr.io/devcontainers/features/github-cli:1": {}, | ||
// // "ghcr.io/gvatsal60/dev-container-features/pre-commit:1": {} | ||
// } | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "cmake --workflow --preset gcc-debug" | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |