Skip to content

Instantly share code, notes, and snippets.

@prologic
Created September 16, 2022 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/ee4901c859c04c1456d6a69aaf15a7f5 to your computer and use it in GitHub Desktop.
Save prologic/ee4901c859c04c1456d6a69aaf15a7f5 to your computer and use it in GitHub Desktop.
Docker's behaviour with a relative ENTRYPOINT?
FROM busybox
ENTRYPOINT ["echo", "Hello", "World"]
@prologic
Copy link
Author

Q: How does docker (Docker) behave with a relative ENTRYPOINT?

See:

$ docker build -t foo . && docker run -i -t --rm foo
[+] Building 2.5s (6/6) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                       0.0s
 => => transferring dockerfile: 94B                                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                                          0.0s
 => => transferring context: 2B                                                                                                                            0.0s
 => [internal] load metadata for docker.io/library/busybox:latest                                                                                          2.4s
 => [auth] library/busybox:pull token for registry-1.docker.io                                                                                             0.0s
 => CACHED [1/1] FROM docker.io/library/busybox@sha256:ad9bd57a3a57cc95515c537b89aaa69d83a6df54c4050fcf2b41ad367bec0cd5                                    0.0s
 => exporting to image                                                                                                                                     0.0s
 => => exporting layers                                                                                                                                    0.0s
 => => writing image sha256:697494dc104cf1b1b551f623d35e16b48c1d649aaf7ec01c911cfe9815e516d8                                                               0.0s
 => => naming to docker.io/library/foo                                                                                                                     0.0s
Hello World

@prologic
Copy link
Author

Q: How does this end up running in a shell?! Which shell?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment