feat: move distribution builds to platform Docker builder
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:1.25.1-bookworm
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates git \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& go version \
|
||||
&& git --version
|
||||
|
||||
WORKDIR /workspace
|
||||
@@ -0,0 +1,15 @@
|
||||
# Platform Distribution Builder
|
||||
|
||||
平台使用此专用镜像在一次性、只读 Docker 容器中构建 Run 和 client-manager distribution。镜像只提供固定版本的 Go 工具链、Git 和 CA certificates;源码、每个 job 的输入与输出均由平台在运行时挂载。
|
||||
|
||||
构建本地固定标签:
|
||||
|
||||
```bash
|
||||
docker build --pull \
|
||||
-t browser-platform-distribution-builder:1.0.0 \
|
||||
platform/distribution-builder
|
||||
```
|
||||
|
||||
运行时通过 `PLATFORM_BUILDER_IMAGE` 指定该显式版本标签;生产环境可以改用内部 registry 的 `image@sha256:...` 引用。平台使用 `--pull never` 执行构建,因此镜像必须预先存在于平台所连接的 Docker daemon 中。
|
||||
|
||||
组件 auth key 不应烘焙进镜像、Docker 参数或环境变量。平台仅通过权限为 `0600` 的 per-job input file 将其提供给构建脚本,并在构建结束后删除整个 job workspace。
|
||||
Reference in New Issue
Block a user