Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
poneding opened this issue Feb 14, 2023 · 4 comments
Open

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

poneding opened this issue Feb 14, 2023 · 4 comments
Labels
area/builder kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage version/19.03

Comments

@poneding
Copy link

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

@poneding poneding added kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage labels Feb 14, 2023
@crazy-max
Copy link
Member

19.03.5 is EOL for a quite some time.

btw, i install docker follow docker docs.

Do you have a link?

@thaJeztah
Copy link
Member

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?

@poneding
Copy link
Author

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?

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

@thaJeztah
Copy link
Member

thaJeztah commented Feb 15, 2023

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.

@neersighted neersighted changed the title build image will ignore ENTRYPOINT in docker 23.x ENTRYPOINT does not work with 23.x CLI and 19.x daemon Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/builder kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage version/19.03
Projects
None yet
Development

No branches or pull requests

3 participants