From 1568c8aa91a6da73991e5f9feea867be9d10ddb4 Mon Sep 17 00:00:00 2001 From: Yury Gargay Date: Mon, 6 Nov 2023 11:22:39 +0100 Subject: [PATCH] Add basic support of devcontainer (#1280) --- .devcontainer/Dockerfile | 14 ++++++++++++++ .devcontainer/devcontainer.json | 10 ++++++++++ .gitignore | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000000..01283058009 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.20-bullseye + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends\ + gettext-base=0.21-4 \ + iptables=1.8.7-1 \ + libgl1-mesa-dev=20.3.5-1 \ + xorg-dev=1:7.7+22 \ + libayatana-appindicator3-dev=0.5.5-2+deb11u2 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + + +WORKDIR /app diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..d6c9556c9e4 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "NetBird", + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "capAdd": ["NET_ADMIN", "SYS_ADMIN", "SYS_RESOURCE"], + "privileged": true +} diff --git a/.gitignore b/.gitignore index 7edcc708716..7f7f53ce86f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ infrastructure_files/setup.env infrastructure_files/setup-*.env .vscode .DS_Store -*.db +*.db \ No newline at end of file