kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

The --destination flag is mandatory even though --no-push is specified

Open nickdk opened this issue 3 years ago • 0 comments

Actual behavior

The --destination flag seems mandatory even when --no-push is specified.

Expected behavior

Since I just want to build a container image to a tarball it seems like I shouldn't need to specify a destination. In some cases I do want to push the tar to a container registry using Crane but that's the point where I specify the complete URI of the container image.

To Reproduce

(please note that I'm building locally from binary for demonstration purposes)

/kaniko/executor --force --context . --no-push --tarPath image.tar

WARN[0000] kaniko is being run outside of a container. This can have dangerous effects on your system
INFO[0000] Retrieving image manifest redacted
INFO[0000] Retrieving image redacted from registry redacted
INFO[0000] Built cross stage deps: map[]
INFO[0000] Retrieving image manifest redacted
INFO[0000] Returning cached image manifest
INFO[0000] Executing 0 build triggers
INFO[0000] Unpacking rootfs as cmd COPY somefile somefile requires it.
INFO[0005] COPY somefile somefile
INFO[0005] Taking snapshot of files...
error pushing image: must provide at least one destination when tarPath is specified

nickdk avatar Jul 27 '22 14:07 nickdk