The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A Docker container can keep running even when its application has stopped responding. Add a Dockerfile HEALTHCHECK that tests the service’s real behavior: Docker records whether the probe succeeds, but an unhealthy status does not, by itself, restart the container. For Compose startup ordering, pair the check with depends_on: condition: service_healthy.
Why “running” does not necessarily mean “working”
Docker can report a container as running because its main process is still alive, while the application inside is unable to serve requests. A process may be stuck, waiting on a failed dependency, or otherwise not responding as expected. Process state alone does not establish that the service is ready or functioning.
A health check adds a separate signal. Docker runs a command inside the container and uses its exit status to set the health state: 0 means healthy, 1 means unhealthy, and 2 is reserved. Docker describes the instruction as a way to test whether a container is still working in its Dockerfile reference.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Write a probe that tests the service users need
A probe should verify meaningful behavior, not merely that a process exists. Docker’s reference gives this HTTP example:
#1 Best Overall
- Adjustable Depth: Depth adjustable from 23" to 40", this open frame server rack accommodates servers and network equipment while providing ample space for A/V gears and cable management. Enjoy easy access to ports and devices from multiple angles.
- High Weight Capacity: Supports up to 300 lbs on the floor (200 lbs when adjusted to maximum depth) and 200 lbs when wall-mounted (depth cannot be adjusted in wall-mounted mode). Made from carbon steel for superior welding performance and durability, this open frame rack is designed to save space while accommodating multiple devices.
- User-Friendly Design: Designed with your convenience in mind, this open frame server rack features an top shelf for extra storage and improved space utilization. The rolling casters let you move it effortlessly wherever you need it, making setup and movement a breeze.
- Widely Applicable: Maximize your space with this adaptable open frame server rack, designed to make the most of every inch. Ideal for retail spots, classrooms, offices, and any area where space is at a premium, it delivers practical solutions for your storage needs.
- Everything You Need: Our open-frame rack comes with fully equipped accessory kit for easy setup and secure installation: 2 x Trays, 4 x Casters, 1 x set of Screws, 16 x M6*12 Cage Nuts, 1 x Grounding Wire, 1 x Internal & External Hex Wrenches, and 1 x User Manual.
HEALTHCHECK --interval=5m --timeout=3s
CMD curl -f http://localhost/ || exit 1
This is a syntax example, not a universal configuration. Confirm that curl is installed in the image, that the URL reaches the intended local service, and that a failed response produces a nonzero exit code. A check that cannot run, or that tests an irrelevant endpoint, can give misleading results. Docker accepts shell-form and exec-array-form commands; if a Dockerfile contains multiple HEALTHCHECK instructions, only the last one takes effect.
Use a probe that matches the service. Docker’s examples include an HTTP request for a web service, redis-cli ping for Redis, and pg_isready for PostgreSQL. The command and any required utilities must be available inside the image.
Set the detection timing deliberately
Docker’s Dockerfile reference lists the following defaults. They are starting points, not recommended values for every application:
Rank #2
- Adjustable Depth: 23-40'' adjustable depth is used for servers and network equipment, ensuring enough space for AV equipment, components, and cabling, while allowing you to access ports and equipment from multiple sides.
- Strong Load Capacity: Ground-Mounted Load Capacity: 500 lbs, Wall-Mounted Load Capacity: 150 lbs. The av rack is made of carbon steel for better weldability performance and can help save space while meeting your need to place multiple devices.
- User-friendly Design: Ergonomic design makes the open frame av rack easier to use. The additional top panel is able to place other items with more available space. Roller design moves anywhere and anytime, is convenient, and is more energy-saving.
- Complete Accessories: We provide the accessories you need, including 2 x Pallets, 145 x M5*10 Cross Head Screws, 4 x Casters, 4 x M10*50 Expansion Screws,10 x M6*12 Cage Nuts, 1 x Grounding Wire, 1 x User Manual.
- Wide Application: The server rack wall mount maximizes the use of available space, suitable for retail venues, classrooms, offices, and other places where space is limited.
| Setting | Docker default | What it controls |
|---|---|---|
interval |
30s |
How often Docker runs a check after the previous check completes. |
timeout |
30s |
How long a probe may run before Docker stops it with SIGKILL. |
start_period |
0s |
An initial allowance for the service to start. |
start_interval |
5s |
The check interval during the start period. Requires Docker Engine 25.0 or later. |
retries |
3 |
How many consecutive failures Docker tolerates before marking the container unhealthy. |
The first probe runs after the configured interval; subsequent probes run at the configured interval after the preceding probe completes. During start_period, Docker uses start_interval. Failures within the start period do not count toward retries until a probe succeeds; once there has been a success, subsequent consecutive failures count. This lets a slow-starting service initialize without immediately accumulating failures, while still allowing later problems to change its state.
Choose values in light of the service’s startup time, the duration of a useful probe, how quickly you need to detect a failure, and how much tolerance you want for temporary faults. A shorter interval can detect trouble sooner but runs checks more often; more retries allow more consecutive failures before the unhealthy state appears. Docker’s documentation lists numerical defaults and examples, not performance measurements or universal tuning guidance. See the HEALTHCHECK reference for timing behavior and version notes.
Use health checks to gate Compose startup
Compose’s short-form depends_on starts dependencies before dependents, but does not wait for a dependency to become healthy. To make a web service wait for a database’s health check to pass, use long-form depends_on with condition: service_healthy. Docker documents this pattern in its startup and shutdown order guide:
Rank #3
- Universal 19” Rack Mount Compatibility – Perfect for pro audio, video, IT, and network gear. Compatible with mixers, routers, patch panels, servers, power amps, and more.
- Heavy-Duty Load Capacity – Built to support up to 550 lbs. Ideal for studio gear, DJ setups, server equipment, and AV components that demand serious stability.
- Robust Steel Frame & Design – Made with 1.5mm thick steel and weighs 36 lbs for maximum durability, reduced vibration, and long-term reliability in any setting.
- Mobile & Secure – Preinstalled with 3” industrial-grade caster wheels (lockable), making it easy to move and position your rack exactly where you need it.
- All-In-One Setup Kit Included – Comes with 34 rack screws (5mm & 6mm), a 1U blank spacer, and an assembly tool—ready for fast installation out of the box.
services:
web:
build: .
depends_on:
db:
condition: service_healthy
db:
image: postgres:18
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
With this configuration, Compose waits for the database health check to pass before creating the dependent web service. The PostgreSQL timing values shown are from Docker’s documented example, not a prescription for every database deployment. The doubled dollar signs defer variable expansion to the container shell. Compose also allows a service definition to override a health check inherited from its image: test may be a string (equivalent to CMD-SHELL) or a list beginning with CMD, CMD-SHELL, or NONE. Use NONE or disable: true to disable an inherited check. See the Compose services reference.
Docker’s Compose Quickstart also demonstrates a Redis probe using redis-cli ping, with a five-second interval, three-second timeout, five retries, and a ten-second start period. Those values are an example configuration; choose settings that fit the service you are checking.
What an unhealthy status does—and does not do
A health check reports state; it is not a restart policy. Docker’s health-check documentation describes changing the health status and emitting a health_status event, while restart policies concern container exit behavior. Do not assume that a container marked unhealthy will restart automatically. If you need another system to react to unhealthy status, verify that system’s behavior and configure it separately.
Rank #4
- ADJUSTABLE DEPTH: 4-Post 42U open frame server rack with 4 vertical rails and adjustable mounting depth 22" to 40" (56,0cm to 101,7cm); Compatible with various servers / switches / data / AV and other IT equipment; EIA/ECA-310-E Compliant
- EASY ASSEMBLY: Mobile network rack with easy-to-follow assembly instructions and online video; Compact flat-pack shipping to avoid damage and facilitate installation; Total product height of 80.3in (204 cm) with casters, 78in (198cm) without casters
- COLD ROLLED STEEL: Durable 4 Post 19in open frame rack designed for ventilation with 42U mounting height and 1320lb (600kg) weight capacity (stationary); 3 install options included: casters, levelling feet, or base-plate to secure rack to the floor
- HARDWARE INCLUDED: Rolling computer/data rack includes cage nuts and screws to mount equipment, easy to read Units (U) and depth adjustment markings, cable management hooks for organization, and required assembly tools
- THE IT PRO'S CHOICE: Designed and built for IT Professionals, this 42U rack is backed for 2-years, including free lifetime 24/5 multi-lingual technical assistance
Compose startup gating is also distinct from recovery after startup: condition: service_healthy controls when Compose creates a dependent service. It does not make an unhealthy dependency restart. In long-form Compose dependencies, restart: true applies to explicit Compose-controlled dependency updates or restarts, not automated container-runtime restarts, as the startup-order documentation explains.
Inspect a failing check
Docker stores a limited amount of probe output in the health status: the first 4096 bytes currently. When a probe fails, inspect that output to distinguish an application failure from a broken check—for example, a missing executable, a bad URL, or an incorrect command. A change in health status also generates a health_status event, which can help identify when the state changed. See the Dockerfile reference for the recorded-output and event details.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Check compatibility before relying on timing options
Docker Engine 25.0 or later is required for Dockerfile start_interval. The Compose services reference marks health-check duration support—including interval, timeout, start_period, and start_interval—as introduced in Compose 2.20.2. Verify the Engine and Compose versions in the environment where the configuration will run; the compatibility information is in the Dockerfile reference and Compose services reference.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

