From b983ca6aa51b9f41aaed6c2561ee4bb3830cd6cf Mon Sep 17 00:00:00 2001 From: DH Date: Sun, 17 Nov 2024 19:03:16 +0000 Subject: [PATCH] add docker dev container configuration --- .devcontainer/Dockerfile | 15 ++++++++++++++ .devcontainer/devcontainer.json | 35 +++++++++++++++++++++++++++++++++ .gitignore | 1 + .vscode/extensions.json | 5 +++++ 4 files changed, 56 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/extensions.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..c357ce1 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:rolling + +ARG USER + +RUN apt update +RUN apt install -y sudo wget git pkgconf +RUN apt install -y build-essential cmake libunwind-dev libglfw3-dev libvulkan-dev libsox-dev git libasound2-dev nasm g++-14 +RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - +RUN echo "deb http://apt.llvm.org/oracular/ llvm-toolchain-oracular main" | tee -a /etc/apt/sources.list +RUN apt update +RUN apt install -y clangd +RUN deluser ubuntu || echo +RUN useradd -m ${USER} +RUN echo ${USER} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USER} \ + && chmod 0440 /etc/sudoers.d/${USER} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7e2d7d0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +{ + "build": { + "dockerfile": "Dockerfile", + "args": { + "USER": "${localEnv:USER}" + } + }, + "runArgs": [ + "--cap-add=SYS_PTRACE", + "--security-opt", + "seccomp=unconfined" + ], + "updateRemoteUserUID": true, + "remoteUser": "${localEnv:USER}", + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "llvm-vs-code-extensions.vscode-clangd", + "streetsidesoftware.code-spell-checker", + "eamodio.gitlens", + "dtoplak.vscode-glsllint", + "slevesque.shader" + ], + "settings": { + "terminal.integrated.defaultProfile.linux": "bash", + "terminal.integrated.profiles.linux": { + "bash": { + "path": "/bin/bash" + } + } + } + } + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 20ff0f6..3e87a53 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ # Visual Studio Files .vs/* .vscode/* +!.vscode/extensions.json *.ipch *.vspx *.psess diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a92b7ef --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-vscode-remote.vscode-remote-extensionpack" + ] +} \ No newline at end of file