Class DockerExtensionImpl

java.lang.Object
io.github.pgatzka.docker.DockerExtensionImpl
All Implemented Interfaces:
DockerExtension

public abstract class DockerExtensionImpl extends Object implements DockerExtension
Concrete implementation of DockerExtension that Gradle decorates and instantiates. The three NamedDomainObjectContainer arguments are constructed by DockerPlugin.apply(org.gradle.api.Project) via ObjectFactory.domainObjectContainer and injected here.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DockerExtensionImpl(org.gradle.api.NamedDomainObjectContainer<ContainerSpec> containers, org.gradle.api.NamedDomainObjectContainer<VolumeSpec> volumes, org.gradle.api.NamedDomainObjectContainer<NetworkSpec> networks)
    Invoked by Gradle's ObjectFactory during extension creation.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.NamedDomainObjectContainer<ContainerSpec>
    Containers declared via docker { containers { register("...") { ... } } }.
    org.gradle.api.NamedDomainObjectContainer<NetworkSpec>
    Networks declared via docker { networks { register("...") { ... } } }.
    org.gradle.api.NamedDomainObjectContainer<VolumeSpec>
    Volumes declared via docker { volumes { register("...") { ... } } }.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DockerExtensionImpl

      @Inject public DockerExtensionImpl(org.gradle.api.NamedDomainObjectContainer<ContainerSpec> containers, org.gradle.api.NamedDomainObjectContainer<VolumeSpec> volumes, org.gradle.api.NamedDomainObjectContainer<NetworkSpec> networks)
      Invoked by Gradle's ObjectFactory during extension creation.
      Parameters:
      containers - container specs registered in docker { containers { ... } }
      volumes - volume specs registered in docker { volumes { ... } }
      networks - network specs registered in docker { networks { ... } }
  • Method Details

    • getContainers

      public org.gradle.api.NamedDomainObjectContainer<ContainerSpec> getContainers()
      Description copied from interface: DockerExtension
      Containers declared via docker { containers { register("...") { ... } } }.
      Specified by:
      getContainers in interface DockerExtension
      Returns:
      the container container, keyed by logical container name
    • getVolumes

      public org.gradle.api.NamedDomainObjectContainer<VolumeSpec> getVolumes()
      Description copied from interface: DockerExtension
      Volumes declared via docker { volumes { register("...") { ... } } }.
      Specified by:
      getVolumes in interface DockerExtension
      Returns:
      the volume container, keyed by logical volume name
    • getNetworks

      public org.gradle.api.NamedDomainObjectContainer<NetworkSpec> getNetworks()
      Description copied from interface: DockerExtension
      Networks declared via docker { networks { register("...") { ... } } }.
      Specified by:
      getNetworks in interface DockerExtension
      Returns:
      the network container, keyed by logical network name