diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..a789118d2 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,22 @@ +ARG VARIANT="bullseye" +FROM mcr.microsoft.com/vscode/devcontainers/rust:1-${VARIANT} + +RUN apt-get update +RUN apt-get install -y \ + git \ + make + +RUN apt-get install -y \ + pkg-config \ + libsystemd-dev \ + libdbus-glib-1-dev \ + build-essential \ + libelf-dev \ + libseccomp-dev \ + libclang-dev \ + libssl-dev + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +RUN rustup component add rustfmt +RUN rustup component add clippy + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..adbfe55e5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +{ + "name": "Youki", + "extensions": [ + "rust-analyzer" + ], + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + }, + "customizations": { + "vscode": { + "settings": { + "lldb.executable": "/usr/bin/lldb", + "files.watcherExclude": { + "**/target/**": true + }, + "rust-analyzer.checkOnSave.command": "clippy" + }, + + "extensions": [ + "vadimcn.vscode-lldb", + "mutantdino.resourcemonitor", + "rust-lang.rust-analyzer", + "tamasfe.even-better-toml", + "serayuzgur.crates" + ] + } + }, + "runArgs": [ + "--privileged" + ], + "build": { + "dockerfile": "Dockerfile" + } +} diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile deleted file mode 100644 index 44c6be49d..000000000 --- a/.gitpod.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM gitpod/workspace-full - -RUN sudo apt-get update && sudo apt-get install -y \ - pkg-config \ - libsystemd-dev \ - libdbus-1-dev \ - build-essential \ - libelf-dev \ - libseccomp-dev - -RUN rustup component add clippy rls rust-analysis rust-src rust-docs rustfmt \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 79951f8f1..000000000 --- a/.gitpod.yml +++ /dev/null @@ -1,12 +0,0 @@ -image: - file: .gitpod.Dockerfile -tasks: - - name: Build - init: cargo build -github: - prebuilds: - pullRequestsFromForks: true - addBadge: true -vscode: - extensions: - - matklad.rust-analyzer \ No newline at end of file