docker-compose启动项目时报错Version in “./docker-compose.yml“ is unsupported.

2023-12-18 17:21:47
docker-compose up -d


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 supported version (e.g "2.2" or "3.3") 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.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

报了版本问题,查了下命令写法不同了。

新的写法是不带中间横杠,如下:

docker compose

文章来源:https://blog.csdn.net/qq_35716085/article/details/135065241
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。