java.lang.Object
org.springframework.boot.buildpack.platform.json.MappedObject
org.springframework.boot.buildpack.platform.docker.type.ContainerStatus

public class ContainerStatus extends MappedObject
Status details returned from Docker container wait.
Since:
2.3.0
Author:
Scott Frederick
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Return the container exit status code.
      Returns:
      the exit status code
    • getWaitingErrorMessage

      public String getWaitingErrorMessage()
      Return a message indicating an error waiting for a container to stop.
      Returns:
      the waiting error message
    • of

      public static ContainerStatus of(InputStream content) throws IOException
      Create a new ContainerStatus instance from the specified JSON content stream.
      Parameters:
      content - the JSON content stream
      Returns:
      a new ContainerStatus instance
      Throws:
      IOException - on IO error
    • of

      public static ContainerStatus of(int statusCode, String errorMessage)
      Create a new ContainerStatus instance with the specified values.
      Parameters:
      statusCode - the status code
      errorMessage - the error message
      Returns:
      a new ContainerStatus instance