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

Specify docker-compose.yml version 3 #2643

Closed
wants to merge 1 commit into from

Conversation

hexagon6
Copy link

@hexagon6 hexagon6 commented Jun 15, 2022

Fixes:

# docker-compose up -d mailserver
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'mailserver'

when running with latest docker-compose

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

Fixes:
```bash
# docker-compose up -d mailserver
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'mailserver'
```
when running with latest docker-compose
@polarathene
Copy link
Member

polarathene commented Jun 15, 2022

This was removed intentionally in Oct 2021.

Justification was discussed here (as referenced by PR removing the version) which further references this issue (which was a user experiencing similar problem to you) references the compose spec mentioning version field is deprecated.

Please let us know more about your environment. Are you running this from an old OS? Current docker-compose (or docker compose) commands should not run into this issue AFAIK? Share your compose CLI version.

@hexagon6
Copy link
Author

Hi @polarathene

I am using the following versions:

# lsb_release -d
Description:	Ubuntu 22.04 LTS
# docker-compose --version
docker-compose version 1.24.1, build 4667896b

So I guess the docker-compose is not latest, looks like it is from 2019.
Sorry about that. Thanks for the quick reply!

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

2 participants