Skip to content
Latchkey

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".

kaniko
error: You must provide --destination flag, unless running with --no-push

Common 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.

Terminal
/kaniko/executor \
  --context dir://. --dockerfile Dockerfile \
  --destination registry.example.com/app:${CI_COMMIT_SHORT_SHA} \
  --destination registry.example.com/app:latest

Build without pushing

For a validation-only build, add --no-push (optionally with --tar-path to keep the artifact).

Terminal
/kaniko/executor --context dir://. --dockerfile Dockerfile --no-push

How 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.

Frequently asked questions

What causes ""--destination must be provided""?
Kaniko defaults to pushing and needs a target tag; omitting --destination with no --no-push is an error.
How do I fix "--destination must be provided"?
Pass one or more --destination flags with fully qualified tags.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card