Class CreateExtraContainer
-
- All Implemented Interfaces:
-
kotlin.Comparable,org.gradle.api.Named,org.gradle.api.Task,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.util.Configurable
@DisableCachingByDefault(because = "Interacts with a live Docker daemon - container, image, network and volume state is external to the build and must never be taken from the build cache") public abstract class CreateExtraContainer extends DockerCreateContainer
-
-
Field Summary
Fields Modifier and Type Field Description private final Property<ContainerHandle>existingContainerprivate final Property<ContainerHandle>createdContainerprivate final TaskOutputsInternaloutputsprivate final Property<String>apiVersionprivate final Property<String>platformprivate final Spec<in TaskInternal>onlyIfprivate final Property<Duration>timeoutprivate final TaskRequiredServicesrequiredServicesprivate final ListProperty<String>volumesprivate final Property<Boolean>attachStderrprivate final TaskDependencyInternaltaskDependenciesprivate final Set<Object>dependsOnprivate final Property<Boolean>ttyprivate final DockerCreateContainer.HealthCheckConfighealthCheckprivate final TaskDestroyablesdestroyablesprivate final Loggerloggerprivate final Property<String>macAddressprivate final Property<String>containerIdprivate final Stringpathprivate final Factory<File>temporaryDirFactoryprivate final Optional<String>reasonTaskIsIncompatibleWithConfigurationCacheprivate final ListProperty<String>cmdprivate final Property<String>imageIdprivate final ListProperty<String>networkAliasesprivate final TaskLocalStatelocalStateprivate final List<InputChangesAwareTaskAction>taskActionsprivate final ListProperty<String>portSpecsprivate final TaskDependencyInternallifecycleDependenciesprivate final ListProperty<String>entrypointprivate BooleanisEnabledprivate BooleanimpliesSubProjectsprivate final Property<String>userprivate final TaskInputsInternalinputsprivate Booleanenabledprivate final TaskStateInternalstateprivate final DockerCreateContainer.HostConfighostConfigprivate final Property<Boolean>attachStdoutprivate final Property<String>urlprivate final Property<String>workingDirprivate final TaskIdentity<?>taskIdentityprivate final Property<String>hostNameprivate final TaskDependencyshouldRunAfterprivate final ExtensionContainerextensionsprivate final BooleanisCompatibleWithConfigurationCacheprivate final TaskDependencyfinalizedByprivate final Property<Boolean>stdinOnceprivate final AntBuilderantprivate final DynamicObjectasDynamicObjectprivate final List<ResourceLock>sharedResourcesprivate BooleandidWorkprivate final ListProperty<DockerCreateContainer.ExposedPort>exposedPortsprivate final Property<DockerClientService>dockerClientServiceprivate final Optional<String>reasonNotToTrackStateprivate final MapProperty<String, String>labelsprivate final Property<String>containerNameprivate Stringgroupprivate final Set<String>reasonsNotToTrackStateprivate final Property<String>imageprivate final Property<String>pidprivate final BooleanisHasCustomActionsprivate final Property<Boolean>stdinOpenprivate final RegularFilePropertycontainerIdFileprivate final Property<Boolean>attachStdinprivate List<Action<in Task>>actionsprivate final DirectoryPropertycertPathprivate final MapProperty<String, String>envVarsprivate final Stringnameprivate final Property<String>ipv4Addressprivate final FiletemporaryDirprivate final LoggingManagerloggingprivate final PathidentityPathprivate final DockerClientdockerClientprivate final TaskDependencymustRunAfterprivate final StandardOutputCapturestandardOutputCaptureprivate final Projectprojectprivate Stringdescription
-
Constructor Summary
Constructors Constructor Description CreateExtraContainer(ObjectFactory objectFactory, ProviderFactory providerFactory)
-
Method Summary
Modifier and Type Method Description final Property<ContainerHandle>getExistingContainer()final Property<ContainerHandle>getCreatedContainer()final Provider<PortMapping>getPrimaryPortMapping()Returns a Provider that provides the primary port mapping if there is such a port mapping otherwise Provider.get will fail final Set<PortMapping>getPortMappings()Returns all port mappings final UnitwithPortMappings(PortMapping portMappings)Adds port mappings to be used with the container final UnitwithEnvironment(ContainerEnvironment environment)Same as CreateExtraContainer. final UnitwithEnvironment(Provider<ContainerEnvironment> environment)Applies the given environmentto this task's DockerCreateContainer.envVars (using MapProperty.putAll).final UnitwithVolumes(Map<String, String> volumes)final UnitwithVolumes(Provider<Map<String, String>> volumes)UnitrunRemoteCommand()-
Methods inherited from class org.gradle.api.DefaultTask
getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, setActions, setDescription, setDidWork, setEnabled, setEnabled, setGroup -
Methods inherited from class com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask
getApiVersion, getCertPath, getDockerClient, getDockerClientService, getUrl, onComplete, onError, onNext, start -
Methods inherited from class com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer
exposePorts, getAttachStderr, getAttachStdin, getAttachStdout, getCmd, getContainerId, getContainerIdFile, getContainerName, getEntrypoint, getEnvVars, getExposedPorts, getHealthCheck, getHostConfig, getHostName, getImage, getIpv4Address, getLabels, getMacAddress, getNetworkAliases, getPid, getPlatform, getPortSpecs, getStdinOnce, getStdinOpen, getTty, getUser, getVolumes, getWorkingDir, withEnvVar -
Methods inherited from class org.gradle.api.internal.AbstractTask
getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getReasonsNotToTrackState, getRequiredServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, setImpliesSubProjects -
Methods inherited from class com.bmuschko.gradle.docker.tasks.image.DockerExistingImage
getImageId, targetImageId, targetImageId, targetImageId -
Methods inherited from class org.gradle.api.Task
configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, doNotTrackState, finalizedBy, hasProperty, mustRunAfter, notCompatibleWithConfigurationCache, onlyIf, onlyIf, onlyIf, property, setDependsOn, setFinalizedBy, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService -
Methods inherited from class kotlin.Comparable
compareTo -
Methods inherited from class org.gradle.api.internal.TaskInternal
acceptServiceReferences, appendParallelSafeAction, doNotTrackStateIf, hasTaskActions, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getExistingContainer
@Internal() final Property<ContainerHandle> getExistingContainer()
-
getCreatedContainer
@Internal() final Property<ContainerHandle> getCreatedContainer()
-
getPrimaryPortMapping
@Internal() final Provider<PortMapping> getPrimaryPortMapping()
Returns a Provider that provides the primary port mapping if there is such a port mapping otherwise Provider.get will fail
-
getPortMappings
@Internal() final Set<PortMapping> getPortMappings()
Returns all port mappings
-
withPortMappings
final Unit withPortMappings(PortMapping portMappings)
Adds port mappings to be used with the container
-
withEnvironment
final Unit withEnvironment(ContainerEnvironment environment)
Same as CreateExtraContainer.withEnvironment(Provider<ContainerEnvironment>) but using a Provider<ContainerEnvironment>
-
withEnvironment
final Unit withEnvironment(Provider<ContainerEnvironment> environment)
Applies the given
environmentto this task's DockerCreateContainer.envVars (using MapProperty.putAll).
-
withVolumes
final Unit withVolumes(Map<String, String> volumes)
-
withVolumes
final Unit withVolumes(Provider<Map<String, String>> volumes)
-
runRemoteCommand
Unit runRemoteCommand()
-
-
-
-