A version 1 compose file is a bare map of service names. Version 2 nests them under services, which looks like churn and is what makes room for the top-level networks and volumes sections.
# version 1 — no version key at all
php:
build: ./docker/php
# version 2
version: '2'
services:
php:
build: ./docker/php
volumes:
dbdata:
networks:
default:
Version 2 also turns on the automatic per-project network and named volumes, both of which version 1 cannot express. The migration is mechanical except for one thing: volumes_from and extends behave differently, and a data-only container pattern from the version 1 era is better rewritten as a named volume than translated.