Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimum required version of docker-compose to 1.25.0 #165

Closed
davidalger opened this issue Jun 18, 2020 · 4 comments
Closed

Update minimum required version of docker-compose to 1.25.0 #165

davidalger opened this issue Jun 18, 2020 · 4 comments
Assignees
Milestone

Comments

@davidalger
Copy link
Collaborator

davidalger commented Jun 18, 2020

Currently stated minimal version of docker-compose

The minimum version of docker-compose is currently stated at 1.18.0. This number was originally chosen as that is when configuration version 3.5 was introduced and users of Ubuntu 18.04 were being tripped up since apt-get by default will install a version of docker-compose which is older than that.

Upcoming stated minimal version of docker-compose

The plan is to raise the minimum version of docker-compose to 1.25.0 or greater. This version is fairly recent, and default installations of Docker Desktop on Mac OS, Ubuntu 20.04, and Fedora 31 would all meet this requirement (see below table). Users with systems running older versions will require installing current/latest release of docker-compose from published binaries:

latest_version=$(curl -s "https://api.github.com/repos/docker/compose/releases/latest" | grep -E '"tag_name":' | awk '{print $2}' | sed -E 's/^"([0-9\.]+).+/\1/')
curl -sL "https://github.com/docker/compose/releases/download/${latest_version}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Given that Ubuntu 18.04 already requires installing a newer version than is available via repositories, and CentOS 7 appears to be the only recent OS version which would be affected by this move, setting the minimal version of docker-compose to 1.25.0 or greater seems to make the most sense.

Default versions of docker-compose by Operating System

System Version Notes
MacOS 1.25.5 Latest Docker Desktop includes 1.25.5; Docker Desktop 2.2.0.0 (minimum required version) includes version 1.25.2
CentOS 7 1.18.0 Available via epel-release repository.
CentOS 8 n/a Not currently available via repositories.
Fedora 31 1.25.4 Available via docker-ce repository.
Ubuntu 18.04 1.17.1 Available via default repositories.
Ubuntu 20.04 1.25.0 Available via default repositories.

Problems this solves

This solves general issues with inconsistencies resulting from individuals using outdated versions of docker-compose. Development of docker-compose moves fast, and various versions of docker-compose between 1.18 and 1.25 have changed how basic flags such as --project-directory function. With 1.23.1 (and prior) for example, warden env config will fail to correctly output the rendered docker compose configuration, and with 1.23.0 and loading of the .env file may not always work correctly.

Another example of a feature we cannot use currently is the --env-file flag added in 1.25.0 as noted in #131

@davidalger davidalger added this to the Warden 0.6.0 milestone Jun 18, 2020
@davidalger davidalger self-assigned this Jun 18, 2020
@navarr
Copy link
Member

navarr commented Jun 18, 2020

Description is missing why the minimum should be raised. What does raising the minimum intend to solve?

@davidalger
Copy link
Collaborator Author

Sorry about that. The description has been updated.

@alexblueacorn
Copy link

warden
gets me this error :
ERROR: docker-compose version should be 1.25.0 or higher ( installed)
My docker-composer :
Docker Compose version v2.0.0-beta.6

This command fixes the issue:
docker-compose disable-v2

@amarmureanuarnia
Copy link

This also woked for me - "docker-compose disable-v2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants