moby / moby/moby

ENTRYPOINT does not work with 23.x CLI and 19.x daemon

Open
#44,993 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/builder kind/bug status/0-triage version/19.03
Dominant language
Go
Stars
72.1k
Forks
19.2k
Avg merge
1d 17h
Merged PRs (30d)
164

Description

Description

Build image docker will ignore ENTRYPOINT in docker 23.x
And this bug causes the compiled image to run getting error 'Error response from daemon: No command specified' in the k8s cluster.

btw, i install docker follow docker docs.

Reproduce

Dockerfile

FROM nginx
ENTRYPOINT ["echo", "hello world"]

build image

$ docker build . -t ngx -f Dockerfile && docker inspect ngx |grep -i entrypoint
"Entrypoint": null,
"Entrypoint": null,
Expected behavior
$ docker inspect ngx |grep -i entrypoint
Entrypoint: ["echo", "hello world"]
docker version
Client: Docker Engine - Community
 Version:           23.0.1
 API version:       1.40 (downgraded from 1.42)
 Go version:        go1.19.5
 Git commit:        a5ee5b1
 Built:             Thu Feb  9 19:46:56 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:45 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.16
  GitCommit:        31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
docker info
-
Additional Info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the provided Dockerfile, docker build command, and docker inspect output using the documented 23.0.1 client and 19.03.5 daemon versions. Compare the result with matching client and daemon versions to isolate the compatibility boundary. Done means ENTRYPOINT is preserved in the built image and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.