Docker Container Startup Control

Docker Container Startup Control

there might be needed use service container startup control based on our service deployment strategy. so here docker provided startup control states:

  • service_started

    dependent container will start when dependency container is started

  • service_healthy

    dependent container will start when dependency container is healthy

  • service_completed_successfully

    dependent container will start when dependency container ran successfully

usage sample:

dependency_service:
    <snip>
    healthcheck: # it's necessary when using "service_healthy"
        <snip>
dependent_service:
    <snip>
    depends_on:
        dependency_service:
            condition: <status> # i.e service_started