actions / runner-images

GitHub Actions runner images
MIT License
9.91k stars 3.02k forks source link

docker-compose not found in Ubuntu 24.04 #9864

Closed daveisfera closed 4 months ago

daveisfera commented 4 months ago

Description

Docker Compose v2 2.27.0 is listed as available on Ubuntu 24.04 but running docker-compose says that it's not found

Platforms affected

Runner images affected

Image version and build link

20240510.1.0

https://github.com/awresports/awresports-server/actions/runs/9105296423/job/25030858761

Is it regression?

Yes

Expected behavior

docker-compose would work on Ubuntu 24.04 like it did on Ubuntu 22.04

Actual behavior

docker-compose is not found

Repro steps

  1. Run a task that uses docker-compose
  2. Observe that it errors out after not being found
kojoru commented 4 months ago

docker-compose is a command for running Compose V1, but this image has Compose V2. Please see the migration guide. In simple cases it boils down to removing the dash, i. e. running docker compose instead of docker-compose.

Compose V1 will also be removed from other images in July.

erik-bershel commented 4 months ago

Hey @daveisfera!

@kojoru sent an exceptionally correct answer already. We have plans to remove Docker Compose V1 at all, and for beta image it was decided to do it from the start. Please update your workflows to work with the current Docker Compose V2 or install old version in runtime.

daveisfera commented 4 months ago

I understand that compose has been added to docker and that's the recommend path forward, but I believe that docker-compose is a stand alone tool and on macOS and the linux distributions I've used, you can run docker-compose --version and it will output something like this since it's a stand alone program:

Docker Compose version v2.27.0-desktop.2
janbrasna commented 1 month ago

@daveisfera You're probably just observing https://docs.docker.com/compose/migrate/#how-do-i-switch-to-compose-v2 Docker Desktop doing this shim for your convenience behind the scenes…