You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems for now --entrypoint=argument can only specify a single argument string. It would be cool if we were able to specify a multiple arguments json array, like in a Dockerfile. Podman already supports this json array syntax.
Reproduce
> docker run -t -i --rm --entrypoint='["python3","--version"]' quay.io/fedora/fedora
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "[\"python3\",\"--version\"]": executable file not found in $PATH: unknown.
Expected behavior
It works fine (ie runs python3 --version like it does with podman:
> podman run -t -i --rm --entrypoint='["python3","--version"]' quay.io/fedora/fedora
Python 3.12.0
docker version
Client:
Version: 25.0.2
API version: 1.43 (downgraded from 1.44)
Go version: go1.21.6
Git commit: 29cf629
Built: Thu Feb 1 00:22:06 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.6
API version: 1.43 (minimum version 1.12)
Go version: go1.20.7
Git commit: 1a79695
Built: Mon Sep 4 12:31:49 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.24
GitCommit: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
runc:
Version: 1.1.9
GitCommit: v1.1.9-0-gccaecfc
docker-init:
Version: 0.19.0
GitCommit: de40ad0
What is the use case for this?
You can do docker run --entrypoint python3 quay.io/fedora/fedora --version
I'm not quite sure why people really use --entrypoint at all except to overwrite what's in the image.
The image may define both an ENTRYPOINT and CMD and in this case you might want to override just the entrypoint while keeping the default CMD. This custom entry point can be some wrapper binary which takes multiple parameter (as ENTRYPOINT in a dockerfile might accept multiple parameters).
There are some poorly designed services with features (such as Github Actions job services) that can take an --entrypoint arg, but don't provide any other way to potentially specify container command or args. This would be a nice workaround, under the assumption that third parties won't fix their software.
Description
Hi,
It seems for now --entrypoint=argument can only specify a single argument string. It would be cool if we were able to specify a multiple arguments json array, like in a Dockerfile. Podman already supports this json array syntax.
Reproduce
Expected behavior
It works fine (ie runs
python3 --version
like it does with podman:docker version
Client: Version: 25.0.2 API version: 1.43 (downgraded from 1.44) Go version: go1.21.6 Git commit: 29cf629 Built: Thu Feb 1 00:22:06 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 24.0.6 API version: 1.43 (minimum version 1.12) Go version: go1.20.7 Git commit: 1a79695 Built: Mon Sep 4 12:31:49 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.24 GitCommit: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523 runc: Version: 1.1.9 GitCommit: v1.1.9-0-gccaecfc docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: