Error: docker-compose command not found #116610
Select Topic AreaBug BodyIf you've encountered the error "docker-compose command not found" on or about April 2, 2024, it means you're using the v1 Docker Compose command. GitHub deprecated v1, and you need to change the command from, e.g., There are other changes too, and your workflows and scripts might need migrations to v2. Take a look at the official Docker Compose V2 Migration Guide for guidance In my case, I discovered that this change occurred when I also had to update my docker-compose.yml files so that each service with a healthcheck used in a services:
app:
depends_on:
- db
db:
healthcheck: "..."...into this.... services:
app:
depends_on:
db:
condition: "service_healthy"
db:
healthcheck: "..."There is an active discussion thread in the repository where v1 was deprecated on the GitHub Actions Hosted Runners: |
Replies: 15 comments 14 replies
|
I've been getting this sporadically today as well. To test that I wasn't going insane (because seemingly nothing changed with the code) - I reran the job with no new commits, submitted commits with comment changes and it seems to pass or fail at random times. I do use docker-compose so that could be the issue. I'll check out the discussion. Thanks for the link! |
|
Comment of appreciation for this issue and leading us to a fix! π€π» |
|
Change |
weird, neither
|
|
I also found the problem since yesterday. |
|
Thanks |
|
Same problem here |
|
I just ran into this as well. Turns out the latest Ubuntu release ( To fix this, you will need to migrate to Docker Compose v2. As previously mentioned this means changing from |
|
It worked for me as well. I changed my script from docker-compose -f "$(dockercomposefile)" up -d to docker compose -f "$(dockercomposefile)" up -d and ran it on Ubuntu-latest. |
This comment was marked as off-topic.
This comment was marked as off-topic.
haha kiss you remove |
ls -lh /usr/libexec/docker/cli-plugins
export PATH=/usr/libexec/docker/cli-plugins/:$PATH
HEALTH_STATUS=$(docker inspect --format='{{json .State.Health.Status }}' 'your-container-name' | tr -d "\"")
until [ "${HEALTH_STATUS}" = "healthy" ]; do
sleep 3
HEALTH_STATUS=$(docker inspect --format='{{json .State.Health.Status }}' 'your-container-name' | tr -d "\"")
done
|
|
I've fixed with to |

@sayhiben I could kiss you