Overrides the image entrypoint.
Section: compose.yaml Basics
Override entrypoint
yaml
yaml
services:
app:
image: myapp:latest
entrypoint: ["./docker-entrypoint.sh"]Explanation
Use carefully when you control container startup behavior.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing compose.yaml Basics
Minimal web + db stack
Simple two-service stack with port publishing and environment variables.
Service built from Dockerfile
Build a service image from local source while also tagging it.
Override service command
Runs a different default command than the image CMD.
Environment as key/value map
Provide container environment values inline in YAML.
Define optional profiles
Marks a service as optional unless its profile is enabled.