From 0ba7bf9f05688ce1a7e18b05fa2f50c78478ce1f Mon Sep 17 00:00:00 2001 From: Thomas Pani Date: Mon, 15 Apr 2024 18:36:54 +0200 Subject: [PATCH] Add a dev container for Soroban development --- .devcontainer/Dockerfile | 9 +++++++++ .devcontainer/devcontainer.json | 23 +++++++++++++++++++++++ 2 files changed, 32 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 0000000..ed092ca --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,9 @@ +FROM mcr.microsoft.com/devcontainers/rust:latest + +USER vscode +RUN cargo install --locked soroban-cli +RUN rustup target add wasm32-unknown-unknown + +# The following should be run at a project level: +# soroban config network add testnet --rpc-url "http://host.docker.internal:8000/soroban/rpc" --network-passphrase "Test SDF Network ; September 2015" +# soroban keys generate alice --network testnet \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..944074e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "Soroban", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}, + }, + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer", + "vscodevim.vim" + ], + "settings": { + "extensions.ignoreRecommendations": true, // don't show recommendations for extensions + "terminal.integrated.copyOnSelection": true + } + } + } +} \ No newline at end of file