From 16933a6f406543a51b20a65d5af6cd8be246b67f Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Wed, 10 Jan 2024 11:28:39 -0800 Subject: [PATCH] add pulumi-devcontainer-kind flavor (#28) * rm vscode devbox plugin * test gitpod * add devcontainer with kind kubernetes * change to unique devcontainer name --- .gitpod.yml | 1 + containers/kind/devcontainer.json | 86 +++++++++++++++++++++++++++++++ devcontainer.json | 80 +++++++++++++++++----------- 3 files changed, 136 insertions(+), 31 deletions(-) create mode 100644 .gitpod.yml create mode 100644 containers/kind/devcontainer.json diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..07fdbf0 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1 @@ +image: ghcr.io/pulumi/devcontainer \ No newline at end of file diff --git a/containers/kind/devcontainer.json b/containers/kind/devcontainer.json new file mode 100644 index 0000000..088b0b2 --- /dev/null +++ b/containers/kind/devcontainer.json @@ -0,0 +1,86 @@ +// Reference: +// - https://containers.dev/features +// - https://containers.dev/implementors/features +// - https://code.visualstudio.com/docs/getstarted/settings +{ + "name": "pulumi-devcontainer-kind", + "image": "ghcr.io/pulumi/devcontainer:latest", + "customizations": { + "vscode": { + "settings": { + // https://github.com/VSCodeVim/Vim + "vim.easymotion": true, + "vim.incsearch": true, + "vim.useSystemClipboard": true, + "vim.useCtrlKeys": true, + "vim.hlsearch": true, + "vim.insertModeKeyBindings": [ + { + "before": ["j", "j"], + "after": [""] + } + ], + "vim.handleKeys": { + "": false, + "": false + }, + "extensions.experimental.affinity": { + "vscodevim.vim": 1 + }, + "go.testTags": "all", + "go.buildTags": "all", + "editor.minimap.enabled": false, + "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", + "editor.terminal.integrated.shell.linux": "/usr/bin/fish", + "terminal.integrated.sendKeybindingsToShell": true, + "terminal.integrated.fontFamily": "FiraMono Nerd Font Mono", + "workbench.colorTheme": "Dracula Soft", + "explorer.openEditors.visible": 1, + "files.trimTrailingWhitespace": true, + "files.trimFinalNewlines": true + }, + "extensions": [ + "golang.go", + "vscodevim.vim", + "github.copilot", + "ms-python.python", + "redhat.vscode-yaml", + "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": { + "username": "vscode", + "userGid": "automatic", + "userUid": "automatic", + "upgradePackages": true, + "nonFreePackages": true + }, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false, + "installDockerBuildx": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + }, + "ghcr.io/devcontainers-contrib/features/kind:1": {} + }, + "postCreateCommand": "git submodule update --init --recursive", + "remoteUser": "vscode", + "forwardPorts": [1313, 2222, 6000, 7681, 8080], + "runArgs": ["--network=host"] +} + diff --git a/devcontainer.json b/devcontainer.json index 548c4ae..59e1d9b 100644 --- a/devcontainer.json +++ b/devcontainer.json @@ -3,35 +3,57 @@ // - https://containers.dev/implementors/features // - https://code.visualstudio.com/docs/getstarted/settings { - "name": "pulumi", - "image": "ghcr.io/pulumi/devcontainer", + "name": "pulumi-devcontainer", + "image": "ghcr.io/pulumi/devcontainer:latest", "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", - "editor.terminal.integrated.shell.linux", "/usr/bin/zsh", - "files.trimTrailingWhitespace", true, - "files.trimFinalNewlines", true - ], + "settings": { + // https://github.com/VSCodeVim/Vim + //"vim.easymotion": true, + //"vim.incsearch": true, + //"vim.useSystemClipboard": true, + //"vim.useCtrlKeys": true, + //"vim.hlsearch": true, + //"vim.insertModeKeyBindings": [ + // { + // "before": ["j", "j"], + // "after": [""] + // } + //], + //"vim.handleKeys": { + // "": false, + // "": false + //}, + //"extensions.experimental.affinity": { + // "vscodevim.vim": 1 + //}, + "go.testTags": "all", + "go.buildTags": "all", + "editor.minimap.enabled": false, + "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", + "editor.terminal.integrated.shell.linux": "/usr/bin/fish", + "terminal.integrated.sendKeybindingsToShell": true, + "terminal.integrated.fontFamily": "FiraMono Nerd Font Mono", + "workbench.colorTheme": "Dracula Soft", + "explorer.openEditors.visible": 1, + "files.trimTrailingWhitespace": true, + "files.trimFinalNewlines": true + }, "extensions": [ "golang.go", "github.copilot", + //"vscodevim.vim", "ms-python.python", "redhat.vscode-yaml", "esbenp.prettier-vscode", "ms-vscode.makefile-tools", - "mtunique.vim-fcitx-remote", "ms-azuretools.vscode-docker", "github.vscode-pull-request-github", "ms-vscode-remote.remote-containers", @@ -42,26 +64,22 @@ }, "features": { "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": true, - "configureZshAsDefaultShell": true, - "installOhMyZsh": true, - "installOhMyZshConfig": true, - "upgradePackages": true, - "nonFreePackages": true, "username": "vscode", + "userGid": "automatic", "userUid": "automatic", - "userGid": "automatic" + "upgradePackages": false, + "nonFreePackages": true }, "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { - "moby": false, "installDockerBuildx": true, + "dockerDashComposeVersion": "v2", "version": "latest", - "dockerDashComposeVersion": "v2" + "moby": false } }, - "postCreateCommand": "git submodule update --init --recursive", + "postCreateCommand": "git submodule update --init --recursive; direnv allow", "remoteUser": "vscode", - "forwardPorts": [1313], + "forwardPorts": [1313, 2222, 6000, 7681, 8080], "runArgs": ["--network=host"] }