Files
EvoBGP/deploy/docker
Denozordec b5061a58d9
CI / changes (push) Successful in 6s
CI / openapi (push) Has been skipped
CI / go (push) Successful in 21s
CI / docker-web (push) Failing after 13s
CI / docker-bird (push) Failing after 14s
CI / bird2 (push) Successful in 13s
CI / docker-go (push) Failing after 13s
fix: update Docker build commands in CI configuration and documentation
Refactored the Docker build commands in the CI workflow to remove the wildcard prefix from variable settings, ensuring proper variable assignment. Updated the README documentation to reflect these changes and provide clearer instructions for building images with the correct variable syntax.
2026-05-19 10:48:09 +07:00
..

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-buildcache
  • git.shts.su/<owner>/evobgp-buildcache:web-buildcache

Локально BuildKit также кэширует /go/pkg/mod и ~/.cache/go-build через RUN --mount=type=cache.

Локальная сборка

Из корня репозитория:

cd deploy/docker
docker buildx bake -f docker-bake.hcl go-images \
  --set "REGISTRY=git.shts.su/<owner>" \
  --set "IMAGE_TAG=latest" \
  --set "SHORT_SHA=$(git rev-parse --short HEAD)"
docker buildx bake -f docker-bake.hcl web-images \
  --set "REGISTRY=git.shts.su/<owner>"

Переменные из variable в docker-bake.hcl задаются без префикса *. (например REGISTRY=…, не *.REGISTRY=…).

Один образ (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.