From e935bc6642ff0ab7756d1fb5223819a5a8670fa2 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sat, 19 Sep 2020 11:53:35 +0200 Subject: [PATCH] test dev containers --- .devcontainer/Dockerfile | 7 +++++++ .devcontainer/devcontainer.json | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 44 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 00000000..1dafdf0f --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,7 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/rust/.devcontainer/base.Dockerfile + +FROM mcr.microsoft.com/vscode/devcontainers/rust:0-1 + +# [Optional] Uncomment this section to install additional packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b5f83b58 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,37 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/rust +{ + "name": "Rust", + "build": { + "dockerfile": "Dockerfile" + }, + "runArgs": [ + "--cap-add=SYS_PTRACE", + "--security-opt", + "seccomp=unconfined" + ], + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "lldb.executable": "/usr/bin/lldb", + // VS Code don't watch files under ./target + "files.watcherExclude": { + "**/target/**": true + } + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "matklad.rust-analyzer", + "bungcip.better-toml", + "vadimcn.vscode-lldb", + "mutantdino.resourcemonitor", + "serayuzgur.crates", + "a5huynh.vscode-ron" + ] + // 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": "rustc --version", + // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. + // "remoteUser": "vscode" +} \ No newline at end of file