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
docker-compose.yml: version
is obsolete
#5797
Comments
Please remove the version line from the |
@nabeeltahir785 from which version of docker this line obsolete? |
If line is removed the warning go away. |
Compose doesn't use version to select an exact schema to validate the Compose file. See https://github.com/compose-spec/compose-spec/blob/master/04-version-and-name.md |
Is there any way to ignore this particular warning as long as I upgrade all docker-compose.yml files? Any flag for that? |
Yes you can comment out the line or remove the line |
Seems we can remove this @DerLinkman. Seeing on https://docs.docker.com/compose/compose-file/04-version-and-name/#version-top-level-element-optional it's optional (now). |
…rod.yml: `version` is obsolete" error - docker-compose.prod.yml delete version line - reference: mailcow/mailcow-dockerized#5797 (comment)
Some of my compose files need to remain compatible with older versions of docker/docker-compose. Is there any way to silence the warning without modifying the compose files? |
may be this issues can help you, jasonacox/Powerwall-Dashboard#453 (comment) |
|
Why the examples still have the |
### What problem does this PR solve? ![image](https://github.com/infiniflow/ragflow/assets/106524776/56eec972-e92a-4cd2-92cc-4c20ba478a52) - remove version top-level element in the compose.yml file when use command `docker compose -f docker-compose-CN.yml up -d` ,it will waring,[maybe it appear after v25,5](mailcow/mailcow-dockerized#5797 (comment)) ![image](https://github.com/infiniflow/ragflow/assets/106524776/e42ebfb7-d51e-4423-b6dd-3a7568a6be4f) ref to https://docs.docker.com/compose/intro/history/#docker-compose-cli-versioning > Version one of the Docker Compose command-line binary was first released in 2014. It was written in Python, and is invoked with docker-compose. Typically, Compose V1 projects include a top-level version element in the compose.yml file, with values ranging from 2.0 to 3.8, which refer to the specific [file formats](https://docs.docker.com/compose/intro/history/#compose-file-format-versioning). > Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with docker compose. Compose V2 ignores the version top-level element in the compose.yml file. Also in `README.MD` show `Docker >= 24.0.0 & Docker Compose >= v2.26.1`. so i want to remove the version. ### Type of change - [x] Other (please describe): remove warning
Contribution guidelines
I've found a bug and checked that ...
Description
Logs:
Steps to reproduce:
Which branch are you using?
master
Which architecture are you using?
x86
Operating System:
rocky linux 9
Server/VM specifications:
12GB/4 Core
Is Apparmor, SELinux or similar active?
yes
Virtualization technology:
kvm
Docker version:
25.0.5
docker-compose version or docker compose version:
v2.25.0
mailcow version:
2024-02
Reverse proxy:
Nginx
Logs of git diff:
Logs of iptables -L -vn:
Logs of ip6tables -L -vn:
Logs of iptables -L -vn -t nat:
Logs of ip6tables -L -vn -t nat:
DNS check:
The text was updated successfully, but these errors were encountered: