mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-09 14:31:35 +08:00
🐛 fix(ci): 修复 build-env 镜像 login shell 下 Go 工具链缺失
- 新增 /etc/profile.d 脚本,在 login shell 重置 PATH 后恢复 Go 工具链路径 - 修正 ENV PATH 中无效的 /root/go/bin 为 GOPATH 实际路径 /go/bin
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user