From 2f34c7ff0440b18269d204bb6eeecd593a2aec86 Mon Sep 17 00:00:00 2001 From: Sebastian Sickelmann Date: Sat, 28 Dec 2024 18:35:07 +0000 Subject: [PATCH] POC: Simplified Devcontainer that seems to work 2024-12 --- .devcontainer | 1 - .devcontainer.json | 66 ++++++++++++++++++------------ .devcontainer/postCreateCommand.sh | 6 +++ 3 files changed, 45 insertions(+), 28 deletions(-) delete mode 160000 .devcontainer create mode 100755 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer b/.devcontainer deleted file mode 160000 index dce1e31..0000000 --- a/.devcontainer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dce1e316309882a657bcc1e32e562706db56a15d diff --git a/.devcontainer.json b/.devcontainer.json index 6a46e60..bacfed6 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -1,10 +1,39 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://code.visualstudio.com/docs/getstarted/settings { - "name": "pulumi", - "image": "ghcr.io/pulumi/devcontainer", + "name": "Pulumi Dev Container", + "image": "mcr.microsoft.com/devcontainers/base:debian", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": true, + "installOhMyZsh": true, + "installOhMyZshConfig": true, + "upgradePackages": true, + "nonFreePackages": true, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false, + "installDockerBuildx": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "1.23" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "18" + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "3" + }, + "ghcr.io/devcontainers/features/dotnet:2": { + "version": "latest" + }, + "ghcr.io/devcontainers-extra/features/pulumi:1": { + } + }, "customizations": { "vscode": { "settings": [ @@ -41,28 +70,11 @@ ] } }, - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": true, - "configureZshAsDefaultShell": true, - "installOhMyZsh": true, - "installOhMyZshConfig": true, - "upgradePackages": true, - "nonFreePackages": true, - "username": "vscode", - "userUid": "automatic", - "userGid": "automatic" - }, - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { - "moby": false, - "installDockerBuildx": true, - "version": "latest", - "dockerDashComposeVersion": "v2" - } + "postCreateCommand": ".devcontainer/postCreateCommand.sh", + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" }, - "postCreateCommand": "git submodule update --init --recursive", "remoteUser": "vscode", "forwardPorts": [1313], "runArgs": ["--network=host"] -} - +} \ No newline at end of file diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 0000000..83051ce --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,6 @@ +#!/bin/bash +npm install -g yarn +pip install setuptools + +curl --silent -L https://github.com/pulumi/pulumictl/releases/download/v0.0.47/pulumictl-v0.0.47-linux-amd64.tar.gz | sudo tar -xz -C /usr/local/bin pulumictl +sudo chmod +x /usr/local/bin/pulumictl \ No newline at end of file