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 
Could you share the official / recommended steps or a script (e.g., using
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!3 Replies
Hi @Jackcool, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question.
Answer
I wasn't able to find a direct answer about building custom Docker images from the ZITADEL source code, here are some relevant sources:
1. Set up Zitadel with Docker Compose : This provides the recommended Docker Compose setup for ZITADEL deployment but doesn't cover building custom images from source.
2. Discord message from @jonasbadstuebner on 2025-09-15 : A community discussion mentions deployment challenges and notes that Docker Compose is recommended for homelab setups while Kubernetes is recommended for production deployments.
For your specific use case of building and pushing to AWS ECR, I'd recommend using the official Docker images or clicking the "Ask for help" button to get assistance from a team member who can provide the exact build process and ECR deployment steps.
Feel free to tag @Ask Inkeep with additional questions.
Got it. Tagging @Rajat for additional help.
hey @Jackcool I will take a look at it and will get back  to you
Is it impossible to build a Docker image form https://github.com/zitadel/zitadel/tree/v4.0.0 (Zitadel version 4.0.0)? Or can I only use the image from GHCR?
GitHub
GitHub - zitadel/zitadel at v4.0.0
ZITADEL - Identity infrastructure, simplified for you. - GitHub - zitadel/zitadel at v4.0.0