From 74d523e924e9cfcc2a36c0e02d5077e1c4154374 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 13 Aug 2021 14:24:38 +0200 Subject: build: add devcontainer configuration (#11670) This allows users to use Codespaces and VS Code Remote Containers easily. --- .devcontainer/Dockerfile | 8 ++++++++ .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ 2 files changed, 34 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 000000000..b127f11f0 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +FROM mcr.microsoft.com/vscode/devcontainers/rust:0-1 + +# Update to Rust 1.54.0 +RUN rustup update 1.54.0 && rustup default 1.54.0 + +# Install Deno +ENV DENO_INSTALL=/usr/local +RUN curl -fsSL https://deno.land/x/install/install.sh | sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..d37be58f2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +{ + "name": "Rust", + "build": { + "dockerfile": "Dockerfile" + }, + "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], + + "settings": { + "lldb.executable": "/usr/bin/lldb", + // VS Code don't watch files under ./target + "files.watcherExclude": { + "**/target/**": true + } + }, + + "extensions": [ + "matklad.rust-analyzer", + "bungcip.better-toml", + "vadimcn.vscode-lldb", + "mutantdino.resourcemonitor" + ], + + "postCreateCommand": "git submodule update --init", + + "remoteUser": "vscode" +} -- cgit v1.2.3