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

  

Category: Docker 

# HEALTHCHECK

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

## What is HEALTHCHECK?

 

HEALTHCHECK: Tells Docker how to test that the container is actually healthy, not just running. Sets the container status to healthy/unhealthy. ` HEALTHCHECK ` in a Dockerfile tells Docker how to check whether the application inside a container actually works, not just whether the process is running. A typical check calls a health URL: ` CMD curl -f http://localhost:8080/health || exit 1 `.

 

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 HEALTHCHECK

  

### How is HEALTHCHECK used in practice?

 

Docker runs the check at an interval and marks the container healthy or unhealthy. Compose can wait for a healthy dependency, and orchestration tools can restart or replace unhealthy containers.

    

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

 

A good health check is quick and tests what really matters, such as whether the app can answer a request. Avoid checks that depend on external services, or one outage can mark every container unhealthy at once. Kubernetes ignores Dockerfile health checks and uses its own readiness and liveness probes, so define those separately there.

    

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

 

```
HEALTHCHECK --interval=30s --timeout=3s \ CMD curl -f http://localhost:8080/health || exit 1
```

 

## At a glance

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

 

## More Docker terms

 

- [environment](<https://delaparra-services.nl/knowledge-hub/environment>) 
- [EXPOSE](<https://delaparra-services.nl/knowledge-hub/expose>) 
- [FROM](<https://delaparra-services.nl/knowledge-hub/from>) 
- [healthcheck (compose)](<https://delaparra-services.nl/knowledge-hub/healthcheck-compose>) 
- [host](<https://delaparra-services.nl/knowledge-hub/host>) 
- [image](<https://delaparra-services.nl/knowledge-hub/image>)

 

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

 

## Skills

 

- ### 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>) 
- ### Docker Compose Patterns

 

Use this skill when creating, modifying, or debugging Docker Compose configurations, even if the user just says they need to wire services together, add a database to their stack, or set up a local development environment with multiple containers. Covers service definitions, health checks, dependency ordering, volumes, networks, environment variables, and development overrides.

 [View skill](<https://delaparra-services.nl/skills/docker-compose-patterns>) [Download zip](<https://delaparra-services.nl/skills/docker-compose-patterns/download>) 
- ### 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>)

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

 

## Manuals

 

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

 

## 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/healthcheck)
