Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed with /bin/bash", "-c", "/kaniko/executor #3008

Closed
barryzhoutrojai opened this issue Feb 14, 2024 · 1 comment
Closed

failed with /bin/bash", "-c", "/kaniko/executor #3008

barryzhoutrojai opened this issue Feb 14, 2024 · 1 comment
Labels
kind/question Further information is requested priority/p2 High impact feature/bug. Will get a lot of users happy

Comments

@barryzhoutrojai
Copy link

Actual behavior
A clear and concise description of what the bug is.

I am using python programming to create a kaniko, so in the pod spec, I specify command like "/bin/bash -c /kaniko/executor"

    job_command = [
        "/bin/bash", "-c", "/kaniko/executor --dockerfile=/workspace/Dockerfile --context=/workspace --destination=trojai/troj-engine-base-tabular:kaniko4 --image-fs-extract-retry=5"
    ]

the pod ends up "startError", check pod's state as following, seem it could not run command.

Events:
  Type     Reason     Age   From               Message
  ----     ------     ----  ----               -------
  Normal   Scheduled  32s   default-scheduler  Successfully assigned abc/image-build-14022024-163346-376405-m9ns4 to kind-worker
  Normal   Pulling    32s   kubelet            Pulling image "gcr.io/kaniko-project/executor:latest"
  Normal   Pulled     29s   kubelet            Successfully pulled image "gcr.io/kaniko-project/executor:latest" in 2.691330585s (2.691353876s including waiting)
  Normal   Created    29s   kubelet            Created container image-build-14022024-163346-376405
  Warning  Failed     29s   kubelet            Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown

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

my pod should be started and run correctly

To Reproduce
Steps to reproduce the behavior:

Since I am programming to run kaniko, no test environments here, so I could not share how to reproduce it here.

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
@JeromeJu JeromeJu added kind/question Further information is requested priority/p2 High impact feature/bug. Will get a lot of users happy labels Feb 16, 2024
@JeromeJu
Copy link
Collaborator

Hi @barryzhoutrojai , it looks like the error is complaining that it cannot find the entrypoint for kaniko executor, which is the image. Could you provide more context what you are trying to achieve through this? You may find more instructions here also: https://github.com/GoogleContainerTools/kaniko/blob/main/README.md#running-kaniko-in-docker

@barryzhoutrojai barryzhoutrojai closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested priority/p2 High impact feature/bug. Will get a lot of users happy
Projects
None yet
Development

No branches or pull requests

2 participants