From 579891a53a3cace8d909eace905f866c648c574d Mon Sep 17 00:00:00 2001 From: Syngnat Date: Sun, 5 Jul 2026 11:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ci):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?build-env=20=E9=95=9C=E5=83=8F=20login=20shell=20=E4=B8=8B=20Go?= =?UTF-8?q?=20=E5=B7=A5=E5=85=B7=E9=93=BE=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 /etc/profile.d 脚本,在 login shell 重置 PATH 后恢复 Go 工具链路径 - 修正 ENV PATH 中无效的 /root/go/bin 为 GOPATH 实际路径 /go/bin --- Dockerfile.build-env | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile.build-env b/Dockerfile.build-env index edbc33be..6819e3b8 100644 --- a/Dockerfile.build-env +++ b/Dockerfile.build-env @@ -11,7 +11,11 @@ ARG WEBKIT_API=4.0 ARG WAILS_VERSION=v2.11.0 ENV DEBIAN_FRONTEND=noninteractive -ENV PATH=/root/go/bin:/usr/local/go/bin:${PATH} +ENV PATH=/go/bin:/usr/local/go/bin:${PATH} + +# Debian's /etc/profile resets PATH in login shells (bash -l), dropping the Go +# toolchain; restore it via profile.d which is sourced after that reset. +RUN printf 'export PATH=/go/bin:/usr/local/go/bin:$PATH\n' > /etc/profile.d/10-gonavi-build-env.sh # Copy only Node.js runtime assets so the Go toolchain from the base image # stays intact for smoke tests and interactive build shells.