Container class
Container runnable.
Constructors
-
Container({Input<
bool> ? blockExternalNetwork, Input<List< ? commands, Input<String> >String> ? entrypoint, Input<String> ? imageUri, Input<String> ? options, Input<String> ? password, Input<String> ? username, Input<List< ? volumes})String> > -
Creates a new Container.
blockExternalNetworkIf set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network cannot be specified in thecontainer.optionsfield.commandsOverrides theCMDspecified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.entrypointOverrides theENTRYPOINTspecified in the container.imageUriThe URI to pull the container image from.optionsArbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host".passwordOptional password for logging in to a docker registry. If password matchesprojects/*/secrets/*/versions/*then Batch will read the password from the Secret Manager;usernameOptional username for logging in to a docker registry. If username matchesprojects/*/secrets/*/versions/*then Batch will read the username from the Secret Manager.volumesVolumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro If theTaskSpec.Volumesfield is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (ro) for existing persistent disks and read-write (rw) for other volume types, regardless of the original mount options specified inTaskSpec.Volumes. If you need different mount settings, you can explicitly configure them in this field.const -
Container.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
blockExternalNetwork
→ Input<
bool> ? -
If set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network cannot be specified in the
container.optionsfield.final -
commands
→ Input<
List< ?String> > -
Overrides the
CMDspecified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.final -
entrypoint
→ Input<
String> ? -
Overrides the
ENTRYPOINTspecified in the container.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
imageUri
→ Input<
String> ? -
The URI to pull the container image from.
final
-
options
→ Input<
String> ? -
Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host".
final
-
password
→ Input<
String> ? -
Optional password for logging in to a docker registry. If password matches
projects/*/secrets/*/versions/*then Batch will read the password from the Secret Manager;final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
username
→ Input<
String> ? -
Optional username for logging in to a docker registry. If username matches
projects/*/secrets/*/versions/*then Batch will read the username from the Secret Manager.final -
volumes
→ Input<
List< ?String> > -
Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro If the
TaskSpec.Volumesfield is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (ro) for existing persistent disks and read-write (rw) for other volume types, regardless of the original mount options specified inTaskSpec.Volumes. If you need different mount settings, you can explicitly configure them in this field.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited