I created a sping-boot app with spring initializer, with Docker Compose Support added. Generated project has an empty compose.yaml, as I havent added nothing to project yet.
When I try to run app in IDE(intellij) i get error:
Stderr:
validating ..../compose.yaml: services must be a mapping
at org.springframework.boot.docker.compose.core.ProcessRunner.run(ProcessRunner.java:96) ~[spring-boot-docker-compose-3.3.0-20240301.111245-172.jar:3.3.0-SNAPSHOT]
at org.springframework.boot.docker.compose.core.DockerCli.run(DockerCli.java:80) ~[spring-boot-docker-compose-3.3.0-20240301.111245-172.jar:3.3.0-SNAPSHOT]
Why is it so?
you can add following line in compose.yaml file.
version: '1.0'
it will solve your problem if you don't want to add any configuration.