container icon indicating copy to clipboard operation
container copied to clipboard

[Bug]: Entrypoint: [""]

Open pstoeckle opened this issue 2 months ago • 1 comments

I have done the following

  • [x] I have searched the existing issues
  • [x] If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

If you have a container image with with an entrypoint set, e.g., the Google distroless images, and you want to use them in your GitLab CI/CD pipeline, you have to override the entrypoint to entrypoint: [""] (see here for details). If you don't want to do it this every time, you can overwrite the entrypoint once using crane or regctl, and push the result with the updated container image config to the container registry, e.g., to my-cr.com/image-with-entrypoint-empty. One can then start start a new container from the updated container image using docker or podman , e.g., like this

$ docker run -it my-cr.com/image-with-entrypoint-empty sh
/ $

Problem description

However, container fails with

$ container run -it my-cr.com/image-with-entrypoint-empty sh
Error: failed to find target executable
Error: failed to start process 0349e4a5-02a7-468d-945e-03563d24e975 in container 0349e4a5-02a7-468d-945e-03563d24e975 (cause: "internalError: "failed to start process (cause: "internalError: "startProcess: failed to start process: internalError: "vmexec error: internalError: "failed to find target executable """")"")

Environment

- OS: 26.6.2
- Container: 1.3.1

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

pstoeckle avatar Sep 08 '26 11:09 pstoeckle

Thanks for the clear reproduction. I opened #2296 to treat Entrypoint: [""] as a cleared image entrypoint, allowing the supplied command to run. I added regression tests for both a supplied command and the image’s Cmd; both failed before the fix.

After the fix, all 219 ContainerAPIClientTests pass. I haven’t tested against your specific image, so confirmation with it would be helpful.

danielsyauqi avatar Sep 21 '26 22:09 danielsyauqi