Skip to content

Commit c3a738d

Browse files
committed
Use GOTOOLCHAIN env var instead of manual OS version replacement
1 parent b7ad79f commit c3a738d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "Gitea DevContainer",
33
"image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm",
4+
"containerEnv": {
5+
// override "local" from packaged version
6+
"GOTOOLCHAIN": "auto"
7+
},
48
"features": {
59
// installs nodejs into container
610
"ghcr.io/devcontainers/features/node:1": {
@@ -32,13 +36,5 @@
3236
]
3337
}
3438
},
35-
"portsAttributes": {
36-
"3000": {
37-
"label": "Gitea Web",
38-
"onAutoForward": "notify"
39-
}
40-
},
41-
// (Workaround to match go.mod version) -- Upgrades go version to 1.24.6, detects container architecture
42-
"postCreateCommand": "ARCH=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/') && curl -fsSL https://go.dev/dl/go1.24.6.linux-${ARCH}.tar.gz | sudo tar -C /usr/local -xz && make deps"
43-
// "postCreateCommand": "make deps"
39+
"postCreateCommand": "make deps"
4440
}

0 commit comments

Comments
 (0)