Skip to content

Conflict between org.springframework.cloud:spring-cloud-starter-bootstrap and org.springframework.boot:spring-boot-docker-compose #1512

@Fachher

Description

@Fachher

After adding spring-cloud-starter-bootstrap to my project, spring-boot-docker-compose is unable to locate docker compose file anymore.

I have added an minimal reproducible example project with two commits. First commit is an working example while the second commit leads to the mentioned problem. Just start the application.

https://github.com/Fachher/spring-cloud-issue

What I have found out so far.

org.springframework.boot.docker.compose.lifecycle.DockerComposeListener is executed before org.springframework.boot.env.EnvironmentPostProcessorApplicationListener after adding 'spring-cloud-starter-bootstrap'.

Therefore org.springframework.boot.docker.compose.lifecycle.DockerComposeProperties is uninitialized during the execution of DockerComposeListener.

If a custom value is set for spring.docker.compose.file in application.yml it is ignored.

If I provide the location of the docker compose file via environment variable (SPRING_DOCKER_COMPOSE_FILE=foo/bar/docker-compose.yml), it is working properly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions