Skip to content

Commit

Permalink
POC: Simplified Devcontainer that seems to work 2024-12
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Sickelmann committed Dec 28, 2024
1 parent 0035baf commit 2f34c7f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 28 deletions.
1 change: 0 additions & 1 deletion .devcontainer
Submodule .devcontainer deleted from dce1e3
66 changes: 39 additions & 27 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -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"]
}

}
6 changes: 6 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2f34c7f

Please sign in to comment.