Entrypoint instruction
The ENTRYPOINT instruction is a Dockerfile directive that specifies the executable or command run when a container starts.
Learn Docker in a Month of Lunches, Second Edition
The ENTRYPOINT instruction specifies the executable or command that a container runs when started from an image.
- How it is used
- Defines the application Docker launches when a container starts from an image.
- How deep it goes
- Explains the startup role and shows executable, arguments, and JAR path, while treating CMD only as an alternative.
- Examples
- Uses a Java Dockerfile and a docker container run command to launch a REST API from a packaged JAR.
- What you can do after
- Operate/configure a Docker image to launch a Java application automatically when its container starts.
Read how Learn Docker in a Month of Lunches, Second Edition explains entrypoint instruction →
Kubernetes in Action, Second Edition
The ENTRYPOINT instruction specifies the executable command that runs when a container starts.
- How it is used
- Defines the executable that launches a containerized application and establishes its image-level startup behavior.
- How deep it goes
- Explains executable selection, CMD arguments, image layers, and Kubernetes overrides without detailing pod manifest syntax.
- Examples
- Uses Node.js Dockerfiles, the Kiada application, docker build output, and docker history output.
- What you can do after
- Apply it via a Dockerfile to make a container launch a chosen application with default command-line arguments.
Read how Kubernetes in Action, Second Edition explains entrypoint instruction →
Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more
A container image build directive that specifies the executable or command behavior used when a container starts.
- How it is used
- Configures executable behavior recorded for a container image when users launch it with Podman.
- How deep it goes
- Distinguishes ENTRYPOINT from CMD and RUN, and specifies argument handling without detailing implementation internals.
- Examples
- Uses ENTRYPOINT "/bin/sh -c" and podman run <image> -d to demonstrate argument passing.
- What you can do after
- Operate/configure images by setting an executable entrypoint and passing launch arguments with podman run.
Also covered in
What to know first
- containerA software container is an isolated execution environment that packages an application and its dependencies, typically sharing the host operating-system kernel.
Related concepts
- CMD instructionalternative to · The Dockerfile CMD instruction specifies the default command or arguments for a container started from an image, which can be overridden at runtime.
- Dockerfilepart of · A Dockerfile is a text file containing instructions for building a Docker container image.
- instructionkind of · An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system.
- WebAssembly moduleconfigures · A WebAssembly module is a compiled, self-contained unit of WebAssembly code and associated definitions that a compatible host can instantiate and execute.
- entry pointconfigures · An entry point is a designated starting location or interface through which a program, component, process, or interaction begins.
Questions about entrypoint instruction
What is entrypoint instruction?
The ENTRYPOINT instruction is a Dockerfile directive that specifies the executable or command run when a container starts.
Which Manning books explain entrypoint instruction?
Learn Docker in a Month of Lunches, Second Edition, Kubernetes in Action, Second Edition and Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more.
What should I know before learning entrypoint instruction?
Manning books that teach entrypoint instruction usually introduce container first.
What is the difference between entrypoint instruction and CMD instruction?
The ENTRYPOINT instruction is a Dockerfile directive that specifies the executable or command run when a container starts. The Dockerfile CMD instruction specifies the default command or arguments for a container started from an image, which can be overridden at runtime.
What is entrypoint instruction a kind of?
Entrypoint instruction is a kind of instruction. An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system.
What is entrypoint instruction part of?
Entrypoint instruction is part of Dockerfile. A Dockerfile is a text file containing instructions for building a Docker container image.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


