docker icon indicating copy to clipboard operation
docker copied to clipboard

WARN[0000] docker-compose.yml: `version` is obsolete

Open theTyster opened this issue 11 months ago • 1 comments

Docker has deprecated the use of version in the root level of the docker compose yaml beginning with Docker Compose 1.27+.

Version top-level element

The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative.

Compose doesn't use version to select an exact schema to validate the Compose file, but prefers the most recent schema when it's implemented.

Compose validates whether it can fully parse the Compose file. If some fields are unknown, typically because the Compose file was written with fields defined by a newer version of the Specification, you'll receive a warning message. Compose offers options to ignore unknown fields (as defined by "loose" mode).

I'll make a PR for this.

These lines can be removed:

https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/with-nginx-proxy/mariadb/apache/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/insecure/mariadb/fpm/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/insecure/postgres/apache/docker-compose.yml#L1 https://github.com/nextcloud/docker/blob/f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1/.examples/docker-compose/insecure/postgres/fpm/docker-compose.yml#L1

theTyster avatar Apr 04 '24 19:04 theTyster