Skip to content

Commit edb9f78

Browse files
committed
devcontainer: drop redundant common-utils feature; ignore IDE build scratch
The MS Go devcontainer image (2.1-1.26) already ships vscode user, sudo, git, curl, zsh, oh-my-zsh — the common-utils feature re-installs all of them, stalling cold-start by ~2min behind deb.debian.org for no behavioral change. Also gitignore .devcontainer/.features.temp.dockerfile and friends — JetBrains/VSCode's devcontainer builder writes those into the workspace during image build and we don't want them in commits.
1 parent c9a7706 commit edb9f78

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
"--security-opt=apparmor=unconfined"
1717
],
1818

19-
"features": {
20-
"ghcr.io/devcontainers/features/common-utils:2": {}
21-
},
22-
19+
// No `features` block: the MS Go devcontainer image already ships the
20+
// vscode user, sudo, git, curl, zsh, oh-my-zsh, and everything else
21+
// common-utils would have installed — adding the feature just re-runs
22+
// a 2-minute apt-get for nothing (and stalls behind deb.debian.org on
23+
// slow networks).
24+
//
2325
// libbtrfs-dev lets you build with `-tags btrfs` (the optional fast-path
2426
// backend that needs cgo); the default static build needs nothing.
25-
// sudo: devcontainer lifecycle commands run as remoteUser (vscode), not root.
26-
// The common-utils feature gives vscode passwordless sudo.
27+
// `sudo` because lifecycle commands run as remoteUser (vscode), and the
28+
// base image's vscode user has passwordless sudo configured.
2729
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y -qq libbtrfs-dev make",
2830
// Show the Makefile target list every time the container is attached, so a new
2931
// contributor immediately sees what they can do (build / test / verify / demo).

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ coverage.txt
2020
# Editor / OS
2121
.DS_Store
2222
.idea/
23+
# Devcontainer / JetBrains gateway scratch files generated during image build
24+
/.devcontainer/.features.temp.dockerfile
25+
/.devcontainer/.*.tmp
26+
# Devcontainer / JetBrains gateway scratch files generated during image build
27+
/.devcontainer/.features.temp.dockerfile
28+
/.devcontainer/.*.tmp
2329
# Allow committed shared settings, ignore per-user editor state.
2430
.vscode/*
2531
!.vscode/settings.json

0 commit comments

Comments
 (0)