suborbital / subo

The Suborbital CLI
Apache License 2.0
81 stars 24 forks source link

fix: Prefer `docker compose` to `docker-compose` #354

Closed callahad closed 2 years ago

callahad commented 2 years ago

Compose v2 is the future, but it may not be present on all installs.

This PR prefers docker compose but falls back to docker-compose if Compose v2 is not detected.

Alternative to #353

Fixes #344

callahad commented 2 years ago

(I suspect my Go may not be idiomatic here.)

The Compose v2 plugin should be present on all Docker Desktop installations updated in the last 18 months. It's most likely to be missing for Linux users who installed the Docker engine directly and accidentally missed the separate docker-compose-plugin package.

The right answer is for them to install the plugin... but some proportion of those folks are likely to still have the legacy docker-compose script on their systems. This PR would make things Just Work for them.

...but it's much simpler to just use Compose v2 directly and encourage people to install the plugin if it fails.

flaki commented 2 years ago

LGTM, would def prefer this to #353

callahad commented 2 years ago

🙏 Thank you very much for the reviews