File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm
77ENV GOTOOLCHAIN=auto
88
9+ # The base image sets GOPATH=/go owned by root. Override to a user-writable
10+ # location so GOTOOLCHAIN=auto can download patch releases without sudo.
11+ ENV GOPATH=/home/vscode/go
12+
913# Install additional OS packages
1014RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1115 && apt-get install -y curl libkrb5-dev gnupg2 \
4751 && go install honnef.co/go/tools/cmd/
[email protected] \
4852 && go install golang.org/x/text/cmd/
[email protected] 4953
50- # Create bin directory for local sqlcmd builds
51- RUN mkdir -p /home/vscode/bin && chown vscode:vscode /home/vscode/bin
54+ # Fix ownership: go install ran as root and populated $GOPATH with root-owned
55+ # files. chown the entire tree so vscode can write (GOTOOLCHAIN=auto downloads).
56+ RUN mkdir -p /home/vscode/bin \
57+ && chown -R vscode:vscode /home/vscode/go /home/vscode/bin
5258ENV PATH="/home/vscode/bin:${PATH}"
You can’t perform that action at this time.
0 commit comments