apple / apple/container

[Bug]: Entrypoint: [""]

Open
#2,248 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
49.9k
Forks
1.8k
Avg merge
1d 20h
Merged PRs (30d)
22

Description

### 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](https://github.com/GoogleContainerTools/distroless), and you want to use them in your GitLab CI/CD pipeline, you have to override the entrypoint to `entrypoint: [""]` (see [here](https://docs.gitlab.com/ci/docker/using_docker_images/#override-the-entrypoint-of-an-image) 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

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

### Problem description

However, `container` fails with

```console
$ 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

```markdown
- OS: 26.6.2
- Container: 1.3.1
```

### Code of Conduct

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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with an image whose entrypoint is [""] and compare `container run` with the documented Docker or Podman behavior. Trace how the container CLI handles the empty entrypoint, and consider the issue done when running `sh` from that image starts successfully instead of reporting a missing target executable.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, swift
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.