From c6a7205d47088645db313d4e648980e3a21a495f Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Wed, 8 Nov 2023 21:32:14 +0000 Subject: [PATCH] add devcontainer --- .devcontainer/Dockerfile | 25 +++++++++++++++++++++++++ .devcontainer/devcontainer.json | 23 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..dc6fa5a --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update && apt install -y --no-install-recommends \ + ca-certificates \ + git \ + openssh-client \ + build-essential \ + pkg-config \ + cmake \ + clang-tidy \ + valgrind \ + libgtest-dev \ + libgmock-dev \ + libfuse3-dev \ + libwebsockets-dev + +ARG USERNAME=user +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN groupadd --gid $USER_GID $USERNAME +RUN useradd --uid $USER_UID --gid $USER_GID -m $USERNAME + +USER $USERNAME diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..1efae55 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "capAdd": "SYS_ADMIN", + "runArgs":["--device", "/dev/fuse"], + "mounts": [{"source": "${localEnv:HOME}/.ssh", "target": "/home/user/.ssh", "type": "bind"}], + + "remoteUser": "user", + + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools-extension-pack", + "ms-vscode.cmake-tools" + ], + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" + } + } + } +} \ No newline at end of file