Kaniko "--destination required" (or use --no-push) in CI
Kaniko pushes the built image by default and requires at least one --destination. If you did not pass a destination and did not ask to skip the push, the executor errors before building.
What this error means
Kaniko exits immediately with "You must provide --destination flag, unless running with --no-push".
error: You must provide --destination flag, unless running with --no-pushCommon causes
No --destination was passed
Kaniko defaults to pushing and needs a target tag; omitting --destination with no --no-push is an error.
A build-only job forgot --no-push
When you only want to validate a build (no registry write), Kaniko still expects --no-push to be explicit.
How to fix it
Provide a destination tag
Pass one or more --destination flags with fully qualified tags.
/kaniko/executor \
--context dir://. --dockerfile Dockerfile \
--destination registry.example.com/app:${CI_COMMIT_SHORT_SHA} \
--destination registry.example.com/app:latestBuild without pushing
For a validation-only build, add --no-push (optionally with --tar-path to keep the artifact).
/kaniko/executor --context dir://. --dockerfile Dockerfile --no-pushHow to prevent it
- Always pass an explicit --destination or --no-push.
- Use fully qualified destination tags including the registry host.
- Keep build-only jobs distinct from push jobs so the intent is clear.