JackcoolJ
ZITADEL3mo ago
Jackcool

Build image and push to ECR

Hello everyone,

I cloned the repo and tried to build a local Docker image:

DOCKER_BUILDKIT=1 docker build --file build/zitadel/Dockerfile . -t zitadel:local

The build consistently fails on this line in the Dockerfile:

6 COPY build/zitadel/entrypoint.sh /app/entrypoint.sh
8 COPY zitadel /app/zitadel <-- fails here

Error:
ERROR: failed to build: failed to solve: failed to compute cache key:
failed to calculate checksum of ref ...: "/zitadel": not found

From reading the Dockerfile, it looks like it expects a prebuilt zitadel binary in the build context root.
I couldn’t find documentation that explains how to produce that binary before the docker build.

My questions
1) Is building this image directly with build/zitadel/Dockerfile still supported?
2) If yes, what are the exact steps to generate/build the zitadel binary that should be copied by COPY zitadel /app/zitadel?
3) If not, should I use docker compose or another recommended workflow?
4) Goal: I also need to push the resulting image to AWS ECR (ideally multi-arch linux/amd64,linux/arm64).
Could you share the official / recommended steps or a script (e.g., using docker buildx
  • ECR login + manifest) that work with this repo?
*What I tried
  • Ran go build from repo root to produce a zitadel binary, but hit missing generated files (gRPC/OpenAPI) and wasn’t sure about the correct generation step or alternative way to get the binary.
  • Tried with and without BuildKit; the same error persists because zitadel binary doesn’t exist in the build context.
  • I can use either: (a) prebuild a binary and COPY it (method B), or (b) a multi-stage Dockerfile if that’s the supported workflow.
If there’s an official workflow (e.g., “generate stubs → build binary → docker build” or “use compose/buildx), plus the recommended way to
push to ECR** (including multi-arch), I’d really appreciate detailed steps or a doc pointer. Thanks a lot!
Was this page helpful?