kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

Kaniko container is not getting created in VMWare Kubernetes

Open dinusha92 opened this issue 5 years ago • 1 comments

Actual behavior Hi all,

I have been using Kaniko in Kubernetes on VMware. When I was trying deploy the kaniko container, I got the following error. The Dockerfile is there present in the k8s cluster as a config map. I have mounted that to the kaniko pod as required. The same thing works fine in other GKE, minikube without any issue.

Error: failed to start container "sample-container": Error response from daemon: OCI runtime create failed: container_linux.go:346 starting container process caused "exec: \ "--dockerfile=/usr/dockerfile/Dockerfile": stat --dockerfile=/usr/dockerfile/Dockerfile: no such file or directory": unknown

Appreciate input on this.

Expected behavior A clear and concise description of what you expected to happen.

To Reproduce Steps to reproduce the behavior:

  1. ...
  2. ...

Additional Information

  • Dockerfile Please provide either the Dockerfile you're trying to build or one that can reproduce this error.
  • Build Context Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
  • Kaniko Image (fully qualified with digest)

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
  • - [ ]
Please check if this error is seen when you use --cache flag
  • - [ ]
Please check if your dockerfile is a multistage dockerfile
  • - [ ]

dinusha92 avatar Sep 25 '20 05:09 dinusha92

i got the same problem, and i solved by adding a command in the top of args

this project's readme section about running in k8s is run, and costed too much time wasted

use this in your yaml

args:
- "/kaniko/executor"
- "--dockerfile=/usr/dockerfile/Dockerfile"

yunfan avatar Jul 31 '22 02:07 yunfan

As @yunfan mentioned I believe this issue is related to running the kaniko container/binary with incorrect args. Closing this for now, feel free to re-open if you are still facing issues here

aaron-prindle avatar May 29 '23 04:05 aaron-prindle