Dockerfile: set GOPATH=/home/crafter/go BEFORE go install layer (was inheriting /root/go)
This commit is contained in:
parent
6c8b0528ab
commit
6cd599079b
1 changed files with 5 additions and 0 deletions
|
|
@ -230,6 +230,11 @@ RUN python3 -m pip install --user --break-system-packages --no-cache-dir pipx \
|
||||||
&& pipx install semgrep
|
&& pipx install semgrep
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
# Reset GOPATH to crafter-owned path BEFORE the go install runs as crafter.
|
||||||
|
# (The /root/go default set in the root-user ENV block fails permission-wise here.)
|
||||||
|
ENV PATH=/home/crafter/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/root/.bun/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/root/go/bin \
|
||||||
|
GOPATH=/home/crafter/go
|
||||||
|
|
||||||
# 17. Go user tooling: govulncheck + staticcheck
|
# 17. Go user tooling: govulncheck + staticcheck
|
||||||
# ============================================================
|
# ============================================================
|
||||||
RUN go install golang.org/x/vuln/cmd/govulncheck@latest \
|
RUN go install golang.org/x/vuln/cmd/govulncheck@latest \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue