Record Class StartContainerTaskParams

java.lang.Object
java.lang.Record
io.github.pgatzka.docker.task.container.StartContainerTaskParams
Record Components:
containerName - the daemon-side container name
image - the image reference (e.g. postgres:16-alpine)
env - environment variables in KEY=VALUE form
ports - host -> container port mappings
networks - declared networks; the first entry becomes the container's primary network
command - override for the image's CMD
volumeMounts - named-volume mounts (volumes must be declared in the docker {} extension)
bindMounts - host-path bind mounts
waitable - readiness strategy
waitTimeout - maximum time to wait for readiness
pullPolicy - when to pull the image

public record StartContainerTaskParams(String containerName, String image, Map<String,String> env, Map<Integer,Integer> ports, List<String> networks, List<String> command, List<VolumeMount> volumeMounts, List<BindMount> bindMounts, Waitable waitable, Duration waitTimeout, PullPolicy pullPolicy) extends Record
Snapshot of the inputs consumed by StartContainerTask's package-private run helper. Captured at task-action time so the helper can be tested without a Gradle task.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • containerName

      public String containerName()
      Returns the value of the containerName record component.
      Returns:
      the value of the containerName record component
    • image

      public String image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • env

      public Map<String,String> env()
      Returns the value of the env record component.
      Returns:
      the value of the env record component
    • ports

      public Map<Integer,Integer> ports()
      Returns the value of the ports record component.
      Returns:
      the value of the ports record component
    • networks

      public List<String> networks()
      Returns the value of the networks record component.
      Returns:
      the value of the networks record component
    • command

      public List<String> command()
      Returns the value of the command record component.
      Returns:
      the value of the command record component
    • volumeMounts

      public List<VolumeMount> volumeMounts()
      Returns the value of the volumeMounts record component.
      Returns:
      the value of the volumeMounts record component
    • bindMounts

      public List<BindMount> bindMounts()
      Returns the value of the bindMounts record component.
      Returns:
      the value of the bindMounts record component
    • waitable

      public Waitable waitable()
      Returns the value of the waitable record component.
      Returns:
      the value of the waitable record component
    • waitTimeout

      public Duration waitTimeout()
      Returns the value of the waitTimeout record component.
      Returns:
      the value of the waitTimeout record component
    • pullPolicy

      public PullPolicy pullPolicy()
      Returns the value of the pullPolicy record component.
      Returns:
      the value of the pullPolicy record component