diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..1a8cc51124 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,19 @@ +ARG VARIANT="bullseye" +FROM mcr.microsoft.com/vscode/devcontainers/rust:1-${VARIANT} + +RUN apt-get update + +# For building +RUN apt-get install -y \ + git \ + pkg-config \ + libsystemd-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 0000000000..e66a827c6c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "oci-spec-rs", + "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" + ] + } + }, + "build": { + "dockerfile": "Dockerfile" + } +} \ No newline at end of file