1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [ENTRYPOINT](<https://delaparra-services.nl/knowledge-hub/entrypoint>)

  

Category: Docker 

# ENTRYPOINT

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is ENTRYPOINT?

 

ENTRYPOINT: The fixed executable a container always runs. Arguments from docker run (and CMD) are appended to it. ` ENTRYPOINT ` sets the fixed program a container always runs. Arguments from ` docker run `, or from ` CMD `, are added to it. With ` ENTRYPOINT ["php", "artisan"] ` and ` CMD ["serve"] `, the container runs ` php artisan serve ` by default, and ` docker run myapp migrate ` runs ` php artisan migrate `.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about ENTRYPOINT

  

### How is ENTRYPOINT used in practice?

 

This makes an image behave like a command-line tool with a sensible default action.

    

### What should you keep in mind with ENTRYPOINT?

 

A common pattern is an entrypoint shell script that prepares things, such as waiting for the database or setting permissions, and ends with ` exec "$@" ` to run the actual command. The ` exec ` is important: it makes your application the main process, so it receives stop signals and shuts down cleanly. Use the JSON array form for both instructions to avoid an extra shell in between.

    

### What does an example of ENTRYPOINT look like?

 

```
ENTRYPOINT ["python", "manage.py"] CMD ["runserver"]
```

 

## At a glance

   CategoryDocker Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Docker terms

 

- [depends\_on](<https://delaparra-services.nl/knowledge-hub/depends-on>) 
- [digest](<https://delaparra-services.nl/knowledge-hub/digest>) 
- [Docker Hub](<https://delaparra-services.nl/knowledge-hub/docker-hub>) 
- [ENV](<https://delaparra-services.nl/knowledge-hub/env>) 
- [environment](<https://delaparra-services.nl/knowledge-hub/environment>) 
- [EXPOSE](<https://delaparra-services.nl/knowledge-hub/expose>)

 

[All terms starting with E](<https://delaparra-services.nl/knowledge-hub#letter-e>)

 

## Skills

 

- ### Docker Build Strategies

 

Use this skill when writing, reviewing, or optimizing Dockerfiles, even if the user just says their image is too large, their build is slow, or they need to harden a container for production. Covers multi-stage builds, layer caching, .dockerignore, non-root users, and image size optimization.

 [View skill](<https://delaparra-services.nl/skills/docker-build-strategies>) [Download zip](<https://delaparra-services.nl/skills/docker-build-strategies/download>) 
- ### Multi Stage Dockerfile

 

'Create optimized multi-stage Dockerfiles for any language or framework'

 [View skill](<https://delaparra-services.nl/skills/multi-stage-dockerfile>) [Download zip](<https://delaparra-services.nl/skills/multi-stage-dockerfile/download>) 
- ### Docker Project Foundations

 

Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs. Covers Dockerfile, compose.yaml, and .dockerignore creation with Docker best practices.

 [View skill](<https://delaparra-services.nl/skills/docker-project-foundations>) [Download zip](<https://delaparra-services.nl/skills/docker-project-foundations/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/entrypoint/skills.zip>)

 

## Manuals

 

- [Docker for your Laravel app](<https://delaparra-services.nl/manuals/docker-voor-je-laravel-app>)

 

## Related services

 

- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)

Perhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/entrypoint)
