如果更新了docker或者docker-desktop
启动时候发现有 version is obsolete警告
删除yml第一行的version字段
上社区原文
Technically you can still define it... But you will get the warning you observed, and it won't be used, as docker compose v2 (=the cli plugin) will always use the latest version of the compose file schema.