From 2a6d2190ea4fec3674e83ab68fcb4476152a65a2 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Wed, 7 Aug 2024 08:35:09 +0100 Subject: [PATCH] chore: add devcontainer for local development (#2258) --- .devcontainer/devcontainer.json | 11 +++++++++++ CONTRIBUTING.md | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..41ddfd73a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "devcontainer", + "image": "ghcr.io/kubefirst/devcontainers/full", + "features": {}, + "customizations": { + "vscode": { + "extensions": [], + "settings": {} + } + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77eab2afc..7784739e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,12 @@ Before making a code change, first discuss your idea via an [issue](https://gith ## Getting Started with the Code +### Dev containers + +A [.devcontainer](https://containers.dev/) configuration is provided to allow for a full-featured development environment. + +### Local development + Kubefirst is created using the [Go Programming Language](https://go.dev). To set up your computer, follow [these steps](https://go.dev/doc/install). Once Go is installed, you can run Kubefirst from any branch using `go run .`. Go will automatically install the needed modules listed in the [go.mod](go.mod) file. As an example, if you want to create a [local cluster](https://docs.kubefirst.io/kubefirst/local/install.html), the command would be `go run . k3d create`. Note that even if you run kubefirst from `main`, the [gitops-template](https://github.com/kubefirst/gitops-template) version used will be the [latest release](https://github.com/kubefirst/gitops-template/releases). If you also want to use the latest from `main` for the template also, you need to run to use the `--gitops-template-url`, and the `--gitops-template-branch` as follow: