Record Class StartContainerTaskParams
java.lang.Object
java.lang.Record
io.github.pgatzka.docker.task.container.StartContainerTaskParams
- Record Components:
containerName- the daemon-side container nameimage- the image reference (e.g.postgres:16-alpine)env- environment variables inKEY=VALUEformports- host -> container port mappingsnetworks- declared networks; the first entry becomes the container's primary networkcommand- override for the image's CMDvolumeMounts- named-volume mounts (volumes must be declared in thedocker {}extension)bindMounts- host-path bind mountswaitable- readiness strategywaitTimeout- maximum time to wait for readinesspullPolicy- 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 Summary
ConstructorsConstructorDescriptionStartContainerTaskParams(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) Creates an instance of aStartContainerTaskParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebindMountsrecord component.command()Returns the value of thecommandrecord component.Returns the value of thecontainerNamerecord component.env()Returns the value of theenvrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.image()Returns the value of theimagerecord component.networks()Returns the value of thenetworksrecord component.ports()Returns the value of theportsrecord component.Returns the value of thepullPolicyrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevolumeMountsrecord component.waitable()Returns the value of thewaitablerecord component.Returns the value of thewaitTimeoutrecord component.
-
Constructor Details
-
StartContainerTaskParams
public 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) Creates an instance of aStartContainerTaskParamsrecord class.- Parameters:
containerName- the value for thecontainerNamerecord componentimage- the value for theimagerecord componentenv- the value for theenvrecord componentports- the value for theportsrecord componentnetworks- the value for thenetworksrecord componentcommand- the value for thecommandrecord componentvolumeMounts- the value for thevolumeMountsrecord componentbindMounts- the value for thebindMountsrecord componentwaitable- the value for thewaitablerecord componentwaitTimeout- the value for thewaitTimeoutrecord componentpullPolicy- the value for thepullPolicyrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
containerName
Returns the value of thecontainerNamerecord component.- Returns:
- the value of the
containerNamerecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
env
Returns the value of theenvrecord component.- Returns:
- the value of the
envrecord component
-
ports
Returns the value of theportsrecord component.- Returns:
- the value of the
portsrecord component
-
networks
Returns the value of thenetworksrecord component.- Returns:
- the value of the
networksrecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
volumeMounts
Returns the value of thevolumeMountsrecord component.- Returns:
- the value of the
volumeMountsrecord component
-
bindMounts
Returns the value of thebindMountsrecord component.- Returns:
- the value of the
bindMountsrecord component
-
waitable
Returns the value of thewaitablerecord component.- Returns:
- the value of the
waitablerecord component
-
waitTimeout
Returns the value of thewaitTimeoutrecord component.- Returns:
- the value of the
waitTimeoutrecord component
-
pullPolicy
Returns the value of thepullPolicyrecord component.- Returns:
- the value of the
pullPolicyrecord component
-