moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
373 stars 244 forks source link

Transition to use Compose v2 in moodle-docker-compose wrapper #202

Closed kabalin closed 2 years ago

kabalin commented 2 years ago

New Go-based compose implementation has become a default branch and primary development focus (https://docs.docker.com/compose/cli-command/):

  • New features and bug fixes will only be considered in the Compose V2 code base.
  • Docker Compose V2 will be the default setting in Docker Desktop for Mac and Windows. You can still opt out through the Docker Desktop UI and the CLI. This means, when you run docker-compose, you will actually be runningdocker compose.
  • Compose V2 will be included with the latest version of the Docker CLI. You can use Compose Switch to redirect docker-compose to docker compose.
  • Compose V2 branch will become the default branch.
  • Docker Compose V1 will be maintained to address any security issues.

Looks like docker-compose alias will exist for some time (see End of Life roadmap issue), however it is now a translating script for docker compose rather than a separate tool and requires a separate installation. Compose v2 (docker compose) will be a part of Docker CLI by default. For Linux it still needs to be installed as plugin in a meantime, but for Win and Mac it is already included.

What this means for moodle-docker

There is a possiblity that some users may not be able to execute docker-compose at some point which bin/moodle-docker-compose rely upon, unless they have Compose Switch installed. Therefore, I suggest to address the issue earlier by:

  1. Use docker compose v2 command by default and fallback to use docker-compose if former one is not available in the system.
  2. Amend docs explaining above in requirements.