Class DockerComposeFile

java.lang.Object
org.springframework.boot.docker.compose.core.DockerComposeFile

public final class DockerComposeFile extends Object
A reference to a docker compose file (usually named compose.yaml).
Since:
3.1.0
Author:
Moritz Halbritter, Andy Wilkinson, Phillip Webb
See Also:
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • find

      public static DockerComposeFile find(File workingDirectory)
      Find the docker compose file by searching in the given working directory. Files are considered in the same order that docker compose uses, namely:
      • compose.yaml
      • compose.yml
      • docker-compose.yaml
      • docker-compose.yml
      Parameters:
      workingDirectory - the working directory to search or null to use the current directory
      Returns:
      the located file or null if no docker compose file can be found
    • of

      public static DockerComposeFile of(File file)
      Create a new DockerComposeFile for the given File.
      Parameters:
      file - the source file
      Returns:
      the docker compose file