Search results
Results from the WOW.Com Content Network
I just updated docker desktop and docker-compose to version v2.27.0-desktop.2 and i cant use version: 3.8 in the docker file anymore
According to the docker issue 11628 (docker/compose#11628) the 'version' field in docker-compose files is outdated.
It looks like your version of docker-compose is incompatible. The version you are using (1.17.1) only supports a compose file format up to version 3.4. You can view the compatibility matrix in the release notes: 1.17.1 release. You can update docker-compose with the following:
While the version property might have been essential in the past, it's no longer necessary in modern Docker Compose workflows. By removing it, you can simplify your Compose files and stay up-to-date with the latest features.
TL;DR: The version attribute in Docker Compose is now obsolete in V2. Remove it from your docker-compose.yml file to avoid warnings.
Docker compose V2 was rewritten from Python to Go, and thus this answer here is obsolete and no longer works. If you tried sudo apt-get remove docker-compose and get E: Unable to locate package docker-compose, try this method : This command must return a result, in order to check it is installed here : Remove the old version :
Version top-level element (obsolete) The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative and you'll receive a warning message that it is obsolete if used.
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
Docker has deprecated the use of version in the root level of the docker compose yaml beginning with Docker Compose 1.27+. The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative.
Update in 2021: The new Docker Compose spec supports not defining a version property and is the recommended way to go moving forward. It supports both v2 and v3 properties. The Compose file is a YAML file defining version (DEPRECATED), services (REQUIRED), networks, volumes, configs and secrets.