CI / changes (push) Successful in 7s
CI / openapi (push) Has been skipped
CI / go (push) Has been skipped
CI / docker-web (push) Has been skipped
CI / docker-bird (push) Successful in 43s
CI / bird2 (push) Successful in 18s
CI / docker-go (push) Failing after 2m4s
Modified the bird build script to disable readline support, streamlining the installation process. Updated the Dockerfile to include the necessary libreadline8 package for the birdc runtime, ensuring compatibility while reducing unnecessary dependencies in the build phase.
Docker-образы EvoBGP
CI (Gitea Actions)
Сборка образов — docker buildx bake (deploy/docker/docker-bake.hcl), а не матрица из восьми отдельных docker build.
| Было | Стало |
|---|---|
8× go mod download + 8× go build (разные BIN) |
1× download + 1× компиляция всех cmd/* |
| 2× сборка BIRD из исходников (api, all) | 1× stage birdc, копируется в runtime |
2× npm ci (web, web-all) |
1× web-deps + два nginx-образа |
| 8 runner'ов с checkout/login | 1 job docker-go, 1 job docker-web |
Кэш registry (переменные bake):
git.shts.su/<owner>/evobgp-buildcache:go-buildcachegit.shts.su/<owner>/evobgp-buildcache:web-buildcache
Локально BuildKit также кэширует /go/pkg/mod и ~/.cache/go-build через RUN --mount=type=cache.
Локальная сборка
Из корня репозитория:
cd deploy/docker
export REGISTRY=git.shts.su/<owner>
export IMAGE_TAG=latest
export SHORT_SHA=$(git rev-parse --short HEAD)
sh write-bake-override.sh
docker buildx bake --allow=fs.read=../.. -f docker-bake.hcl -f docker-bake.override.hcl go-images
docker buildx bake --allow=fs.read=../.. -f docker-bake.hcl -f docker-bake.override.hcl web-images
В docker-bake.hcl: context = "../.." (корень репо), dockerfile = "deploy/docker/…" (путь от корня репо). CI: write-bake-override.sh + --allow=fs.read=$GITHUB_WORKSPACE в .gitea/workflows/ci.yaml.
Один образ (legacy):
docker build -f deploy/docker/gobinary/Dockerfile \
--target build-all \
--build-arg BIN=evobgp-api \
-t evobgp-api:local .
Runtime-образы в bake ожидают stage build-all (через bake contexts), не отдельный --build-arg BIN на старый target build.