kaniko: Kaniko executor image fails to start (unknown command true for executor)

Actual behavior The Kaniko executor image fails to start.

gcloud build submit fails with the following error message:

Pulling image: gcr.io/kaniko-project/executor:latest
latest: Pulling from kaniko-project/executor
Digest: sha256:fb27a2ca60b0943d124100abb66e937bfcf81821d2c79eb7813b7e74637958d0
Status: Downloaded newer image for gcr.io/kaniko-project/executor:latest gcr.io/kaniko-project/executor:latest
Error: unknown command "true" for "executor"
Run 'executor --help' for usage.
ERROR
ERROR: build step 0 "gcr.io/kaniko-project/executor:latest" failed: exit status 1

Expected behavior Image is built using kaniko

To Reproduce submit a build with a minimal dockerfile, e.g. with FROM python:3.7

gcloud config set builds/use_kaniko True
gcloud builds submit --tag $IMAGE_NAME:$IMAGE_TAG

Additional Information

  • Dockerfile See above. A minimal file causes the error.
  • Build Context Only the dockerfile
  • Kaniko Image (fully qualified with digest) gcr.io/kaniko-project/executor:latest Digest: sha256:fb27a2ca60b0943d124100abb66e937bfcf81821d2c79eb7813b7e74637958d0

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
  • - [ ]
Please check if the build works in docker but not in kaniko
  • - [x]
Please check if this error is seen when you use --cache flag
  • - [x]
Please check if your dockerfile is a multistage dockerfile
  • - [x]

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 19
  • Comments: 15 (4 by maintainers)

Most upvoted comments

This issue is fixed in v272.0.0 of the gcloud sdk (released on 2019-11-19)

I’ve verified that it works with kaniko versions v0.13.0 and v0.14.0

I am still having this issue, what is the solution?

I’m following the official documentation: https://cloud.google.com/build/docs/kaniko-cache

Just received this error i have checked all above details and all correct Kaniko version, sdk all latest. any thoughts how i can resolve this Step #1: error building image: error building stage: waiting for process to exit: exit status 1 Finished Step #1 ERROR ERROR: build step 1 “gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870” failed: step exited with non-zero status: 1

We are working on a fix for this issue.

As a potential work around you can try using v0.12.0 image of kaniko gcloud config set builds/kaniko_image gcr.io/kaniko-project/executor:v0.12.0

I have the same issue, kaniko is enabled with gcloud config set builds/use_kaniko True as per docs here: https://cloud.google.com/cloud-build/docs/kaniko-cache without an explicit cloudbuild.yaml.

I’m using a cloudbuild.yaml and running into the same issue.

As a quickfix I’m using --cache=true

EDIT:

only --cache is working too