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 docker-compose to support Docker v1.6+ #2717

Closed
wants to merge 1 commit into from

Conversation

Lycol50
Copy link

@Lycol50 Lycol50 commented Aug 10, 2022

Without this, docker-compose will output:
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'mailserver'

Learn More: https://stackoverflow.com/questions/36724948/docker-compose-unsupported-config-option-for-services-service-web

Description

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Without this, docker-compose will output:
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'mailserver'

Learn More: https://stackoverflow.com/questions/36724948/docker-compose-unsupported-config-option-for-services-service-web
@casperklein
Copy link
Member

The version field is not required and only informational. See my comment here.

If you get an error, you're probably using a very old docker-compose version. The current version is 2.9.0.

@polarathene
Copy link
Member

Closing as omitting version is considered best practice.

The failure you encountered tells us that your docker-compose is over 2 years old, please update it instead of trying to workaround the problem.


More Info

This is a recurring issue users run into and attempt to "fix": #2643 (comment)

Since the docker-compose 1.27 release (Aug 2020), the version option was made optional. If you are using Ubuntu 20.04 LTS, you may have an outdated docker-compose package (1.25); if so upgrade to Ubuntu 22.04 LTS or follow Dockers official docs to install newer version.

Note that in PR 2643, the user reported using Ubuntu 22.04, but their docker-compose was 1.24 (2019 release), presumably they upgraded Ubuntu, but their package was not updated (may have been installed manually at the time?). If you do have trouble updating, another user shared their troubleshooting experience which may help you.


For reference:

There may also be some issues for swarm users, but we do not support that type of deployment.

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

Successfully merging this pull request may close these issues.

None yet

3 participants