From b7ad79fd341f015daf016a49b7975e120f68ad6b Mon Sep 17 00:00:00 2001 From: Jackson Stewart Date: Sun, 17 Aug 2025 17:04:20 -0600 Subject: [PATCH 1/3] Upgrade go to 1.24.6 via postCreateCommand --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 95d673cd30901..f1afef357df6a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -38,5 +38,7 @@ "onAutoForward": "notify" } }, - "postCreateCommand": "make deps" + // (Workaround to match go.mod version) -- Upgrades go version to 1.24.6, detects container architecture + "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" + // "postCreateCommand": "make deps" } From c3a738d86cfc319986ed1ff267c9c1282dd6cf11 Mon Sep 17 00:00:00 2001 From: Jackson Stewart Date: Mon, 18 Aug 2025 13:48:30 +0000 Subject: [PATCH 2/3] Use GOTOOLCHAIN env var instead of manual OS version replacement --- .devcontainer/devcontainer.json | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f1afef357df6a..d630c855580fe 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,10 @@ { "name": "Gitea DevContainer", "image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm", + "containerEnv": { + // override "local" from packaged version + "GOTOOLCHAIN": "auto" + }, "features": { // installs nodejs into container "ghcr.io/devcontainers/features/node:1": { @@ -32,13 +36,5 @@ ] } }, - "portsAttributes": { - "3000": { - "label": "Gitea Web", - "onAutoForward": "notify" - } - }, - // (Workaround to match go.mod version) -- Upgrades go version to 1.24.6, detects container architecture - "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" - // "postCreateCommand": "make deps" + "postCreateCommand": "make deps" } From 9ad84daf8e2be9ebe73ac55d0a9daa1ad5cb2b97 Mon Sep 17 00:00:00 2001 From: Jackson Stewart Date: Mon, 18 Aug 2025 07:51:36 -0600 Subject: [PATCH 3/3] Add portsAttributes back Signed-off-by: Jackson Stewart --- .devcontainer/devcontainer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d630c855580fe..0bf0edc45ee21 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -36,5 +36,11 @@ ] } }, + "portsAttributes": { + "3000": { + "label": "Gitea Web", + "onAutoForward": "notify" + } + }, "postCreateCommand": "make deps" }