From 69ccd571f039af9d1f99c1de2f0664e87adb127a Mon Sep 17 00:00:00 2001 From: Martin Eckardt Date: Mon, 4 Mar 2024 10:45:17 +0000 Subject: [PATCH 1/3] Add devcontainer config --- .devcontainer/devcontainer.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..1f41a337 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +// For format details, see https://aka.ms/devcontainer.json. +{ + "name": "Avalanche-Network-Runner Dev Container", + + "image": "golang:latest", + "runArgs": ["--network=host"], + + "remoteEnv": { + "PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/bin" + } +} \ No newline at end of file From ebdec0172d011d16174b1865a6132c41b827679f Mon Sep 17 00:00:00 2001 From: Martin Eckardt Date: Mon, 4 Mar 2024 15:37:37 +0000 Subject: [PATCH 2/3] Add build --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1f41a337..58c463a4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,5 +7,7 @@ "remoteEnv": { "PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/bin" - } + }, + + "postCreateCommand": "scripts/build.sh" } \ No newline at end of file From 97fa3ddf60ba90da94d0a7f60e6bb756ec07307b Mon Sep 17 00:00:00 2001 From: Martin Eckardt Date: Tue, 5 Mar 2024 16:47:07 +0100 Subject: [PATCH 3/3] Add docs to Readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8e7fee9b..4d866f59 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ export PATH=~/bin:$PATH To add it to your path permanently, add an export command to your shell initialization script (ex: .bashrc). +## Dev Container & Codespace + +To get started easily, we provide a Dev Container specification, that can be used using GitHub Codespace or locally using Docker and VS Code. [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) are a concept that utilizes containerization to create consistent and isolated development environment. You can run them directly on Github by clicking **Code**, switching to the **Codespaces** tab and clicking **Create codespace on main**. Alternatively, you can run them locally with the extensions for [VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) or other code editors. + ## Build from source code This is only needed by advanced users who want to modify or test Avalanche Network Runner in specific ways.