ENTRYPOINT does not work with 23.x CLI and 19.x daemon
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
19.03.5 is EOL for a quite some time.
btw, i install docker follow docker docs.
Do you have a link?
Yes, from the output, it looks like the CLI was updated, but the Docker Engine (daemon) itself not, and that is still running a very old version.
This output is also confusing, because the container.io package (which contains runc) is updated to 1.6.16, but it looks like there's a very old pre-release of runc installed;
containerd:
Version: 1.6.16
GitCommit: 31aa4358a36870b21a992d3ad2bef29e1d693bec
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
@srcio wondering how you installed the engine, and how containerd (and runc) were installed. What Linux distribution are you running on? (perhaps you can update the first comment to include the output of docker info add well?
Yes, from the output, it looks like the CLI was updated, but the Docker Engine (daemon) itself not, and that is still running a very old version.
This output is also confusing, because the
container.iopackage (which containsrunc) is updated to 1.6.16, but it looks like there's a very old pre-release ofruncinstalled;containerd: Version: 1.6.16 GitCommit: 31aa4358a36870b21a992d3ad2bef29e1d693bec runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657@srcio wondering how you installed the engine, and how containerd (and runc) were installed. What Linux distribution are you running on? (perhaps you can update the first comment to include the output of
docker infoadd well?
Linux distribution: Ubuntu 20.04 (amd64)
I uninstalled docker before and reinstalled it this time followed this page install docker enging
i have downgrade docker client to 20.10.22, and everything ok now.
Client: Docker Engine - Community
Version: 20.10.22
API version: 1.40
Go version: go1.18.9
Git commit: 3a2c30b
Built: Thu Dec 15 22:28:08 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
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
i have downgrade docker client to 20.10.22, and everything ok now.
It looks like only the CLI (client) was downgraded. The 20.10 CLI does not use BuildKit by default, and will use the deprecated "legacy builder". From your report, it's very likely there's an issue with older versions of BuildKit (like the version included in Docker 19.03).
Is your daemon (engine) running locally or is it running on a remote machine (or a separate VM?). I'd highly recommend upgrading to a supported version if possible, because both Docker 19.03 and runc v1.0.0-rc8 are no longer maintained and have known vulnerabilities.