Class NetworkSpec
java.lang.Object
io.github.pgatzka.docker.dsl.spec.NetworkSpec
- All Implemented Interfaces:
org.gradle.api.Named
Spec describing a Docker network the plugin will create and manage. Instantiated by Gradle's
ObjectFactory for each name registered in docker { networks { register(...) }}.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Constructor Summary
ConstructorsConstructorDescriptionNetworkSpec(String name) Invoked by Gradle'sObjectFactorywhen a network is registered. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<Boolean> Whether non-service containers may attach to the network (--attachable).abstract org.gradle.api.provider.Property<String> Network driver passed todocker network create --driver.abstract org.gradle.api.provider.Property<Boolean> Whether the network is--internal(no outbound connectivity).Labels applied to the network as--label KEY=VALUEpairs.getName()
-
Constructor Details
-
NetworkSpec
Invoked by Gradle'sObjectFactorywhen a network is registered. Defaultsdriverto"bridge"and bothinternalandattachabletofalse.- Parameters:
name- logical network name as registered in the DSL
-
-
Method Details
-
getDriver
Network driver passed todocker network create --driver. Defaults to"bridge".- Returns:
- the driver property
-
getLabels
Labels applied to the network as--label KEY=VALUEpairs.- Returns:
- the labels property
-
getInternal
Whether the network is--internal(no outbound connectivity). Defaults tofalse.- Returns:
- the internal property
-
getAttachable
Whether non-service containers may attach to the network (--attachable). Defaults tofalse.- Returns:
- the attachable property
-
getName
- Specified by:
getNamein interfaceorg.gradle.api.Named
-