Class CreateNetworkTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.github.pgatzka.docker.task.DockerTask
io.github.pgatzka.docker.task.network.CreateNetworkTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.Named,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@UntrackedTask(because="Docker daemon side effects must always run")
public abstract class CreateNetworkTask
extends DockerTask
Creates a Docker network according to its
NetworkSpec.
Idempotent: a no-op when a network with the same name already exists (driver, internal,
attachable, and labels are not reconciled). Marked UntrackedTask because the daemon
side effect must always run.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionInvoked by Gradle's bytecode-decorated subclass; not for direct use. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Gradle entry point for this task.abstract org.gradle.api.provider.Property<Boolean> MirrorsNetworkSpec.attachable: whentrue, standalone containers may attach to this network.abstract org.gradle.api.provider.Property<String> MirrorsNetworkSpec.driver: the network driver (e.g.abstract org.gradle.api.provider.Property<Boolean> MirrorsNetworkSpec.internal: whentrue, the network is isolated from external networks.MirrorsNetworkSpec.labels: labels applied to the network on the daemon.abstract org.gradle.api.provider.Property<String> MirrorsNetworkSpec.name: the network name registered on the daemon.Methods inherited from class io.github.pgatzka.docker.task.DockerTask
getDockerServiceMethods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
CreateNetworkTask
public CreateNetworkTask()Invoked by Gradle's bytecode-decorated subclass; not for direct use.
-
-
Method Details
-
getNetworkName
MirrorsNetworkSpec.name: the network name registered on the daemon.- Returns:
- the network name property
-
getDriver
MirrorsNetworkSpec.driver: the network driver (e.g.bridge).- Returns:
- the network driver property
-
getLabels
MirrorsNetworkSpec.labels: labels applied to the network on the daemon.- Returns:
- the labels property
-
getInternal
MirrorsNetworkSpec.internal: whentrue, the network is isolated from external networks.- Returns:
- the internal flag property
-
getAttachable
MirrorsNetworkSpec.attachable: whentrue, standalone containers may attach to this network.- Returns:
- the attachable flag property
-
execute
public void execute()Gradle entry point for this task. Delegates to the package-privaterun(DockerClient, String, String, Map, boolean, boolean, Logger)helper.
-