'Service airflow-cli does not work with new docker compose format

I use the Docker deployment of Airflow from their official docs page. When docker-compose changed to docker compose, it broke the airflow cli commands. It hangs on airflow-cli-1 starting when I try to run it from the shell script.

Here is Airflow's original docker-compose.yaml: 'https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml'

Here is the original command:
exec docker-compose run --rm airflow-cli

Here is the broken command with new docker compose:
exec docker compose run --rm airflow-cli

I can't figure out why the new docker compose command hangs on the airflow-cli service starting.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source