From c4e3a3e769ec35cbf17eef760e4bb7ffd5b8feca Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Mon, 13 Nov 2023 15:29:20 -0800 Subject: [PATCH 1/3] add devbox vscode extension --- .devcontainer.json | 63 +++++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 1 - devcontainer.json | 2 +- 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 .devcontainer.json delete mode 120000 .devcontainer/devcontainer.json diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 0000000..2cf9a55 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,63 @@ +// Reference: +// - https://containers.dev/features +// - https://containers.dev/implementors/features +// - https://code.visualstudio.com/docs/getstarted/settings +{ + // NOTE: remove `image` and uncomment `build` to build the image locally + //"build": { + // "dockerfile": "Dockerfile", + // "context": "." + //}, + "name": "pulumi", + "image": "ghcr.io/pulumi/devcontainer", + "settings": { + "terminal.integrated.shell.linux": "/usr/bin/zsh" + }, + "customizations": { + "vscode": { + "settings": [ + "go.testTags", "all", + "go.buildTags", "all", + "editor.minimap.enabled", false, + "explorer.openEditors.visible", 1, + "editor.quickSuggestionsDelay", 0, + "editor.suggestSelection", "first", + "editor.snippetSuggestions", "top", + "editor.gotoLocation.multipleReferences", "goto", + "editor.gotoLocation.multipleDefinitions", "goto", + "editor.gotoLocation.multipleDeclarations", "goto", + "editor.gotoLocation.multipleImplementations", "goto", + "editor.gotoLocation.multipleTypeDefinitions", "goto", + "files.trimTrailingWhitespace", true, + "files.trimFinalNewlines", true + ], + "extensions": [ + "golang.go", + "vscodevim.vim", + "github.copilot", + "ms-python.python", + "jetpack-io.devbox", + "redhat.vscode-yaml", + "eg2.vscode-npm-script", + "esbenp.prettier-vscode", + "ms-vscode.makefile-tools", + "ms-azuretools.vscode-docker", + "github.vscode-pull-request-github", + "ms-vscode-remote.remote-containers", + "visualstudioexptteam.vscodeintellicode", + "bierner.markdown-preview-github-styles" + ] + } + }, + "features": { + "ghcr.io/devcontainers/features/common-utils:2": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "version": "latest", + "installDockerBuildx": true, + "moby": false + } + }, + "postCreateCommand": "git submodule update --init --recursive", + "remoteUser": "vscode", + "runArgs": ["--network=host"] +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 120000 index 96829f9..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1 +0,0 @@ -../devcontainer.json \ No newline at end of file diff --git a/devcontainer.json b/devcontainer.json index fbbc13c..2cf9a55 100644 --- a/devcontainer.json +++ b/devcontainer.json @@ -35,8 +35,8 @@ "golang.go", "vscodevim.vim", "github.copilot", - "eamodio.gitlens", "ms-python.python", + "jetpack-io.devbox", "redhat.vscode-yaml", "eg2.vscode-npm-script", "esbenp.prettier-vscode", From 8177e7ff3271ce75a2b6e29ea656014bbe83ff4b Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Mon, 13 Nov 2023 15:32:46 -0800 Subject: [PATCH 2/3] specify git submodule for init and update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 393e5e6..d568a46 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ To add this repository as a submodule to your project, run the following command ```bash git submodule add https://github.com/pulumi/devcontainer .devcontainer -git submodule update --init --recursive +git submodule update --init --recursive .devcontainer ``` To update the devcontainer submodule in consuming repos: ```bash -git submodule update --remote --merge +git submodule update --remote --merge .devcontainer ``` After the submodule is added, you can open your project in VS Code and it will automatically detect the Dev Container configuration and prompt you to open the project in a container, or you can open the project in Github CodeSpaces. From ceb4118838cc79948d2f14cf2264e41c717bb3e8 Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Mon, 13 Nov 2023 15:46:21 -0800 Subject: [PATCH 3/3] add python venv --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 2e0982e..14a4f59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -146,6 +146,7 @@ RUN set -ex \ ARG APT_PKGS="\ python3 \ python3-pip \ +python3-venv \ dotnet-sdk-7.0 \ dotnet-runtime-7.0 \ "