Docker Compose: how to wait for the MySQL server container to be ready?

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SonarLint - Clean code begins in your IDE with SonarLint
  • SaaSHub - Software Alternatives and Reviews
  • wait-for-it

    Pure bash script to test and wait on the availability of a TCP host and port

    python:3.10.5-slim-buster is a Debian GNU/Linux 10 (buster). Follow the Debian package link given by wait-for-it, we'll eventually find this link, I downloaded the wait-for-it_0.0~git20160501.orig.tar.gz file and extracted out to the project root directory where,, .dockerignore, Dockerfile and docker-compose.yml are.

  • Wait4X

    Wait4X allows you to wait for a port or a service to enter the requested state.

    Further Googling, I found this Docker document Control startup and shutdown order in Compose, whereby several tools are recommended to implement the waiting, among them are wait-for-it and Wait4X.

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • Docker Compose

    Define and run multi-container applications with Docker -- an overview of Compose.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts