Class DockerCreateContainer
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask
-
- com.bmuschko.gradle.docker.tasks.image.DockerExistingImage
-
- com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer
-
- All Implemented Interfaces:
Comparable<Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.TaskInternal
,ExtensionAware
,Task
,Configurable<Task>
public class DockerCreateContainer extends DockerExistingImage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DockerCreateContainer.ExposedPort
static class
DockerCreateContainer.HealthCheckConfig
static class
DockerCreateContainer.HostConfig
-
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.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
Constructors Constructor Description DockerCreateContainer(ObjectFactory objectFactory)
-
Method Summary
-
Methods inherited from class com.bmuschko.gradle.docker.tasks.image.DockerExistingImage
getImageId, targetImageId, targetImageId, targetImageId
-
Methods inherited from class com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask
getApiVersion, getCertPath, getDockerClient, getDockerClientService, getNextHandler, getRegistryAuthLocator, getUrl, onComplete, onError, onNext, start
-
Methods 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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Methods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
-
-
-
Constructor Detail
-
DockerCreateContainer
@Inject public DockerCreateContainer(ObjectFactory objectFactory)
-
-
Method Detail
-
getPortSpecs
@Input @Optional public final ListProperty<String> getPortSpecs()
-
getEnvVars
@Input @Optional public final MapProperty<String,String> getEnvVars()
-
getCmd
@Input @Optional public final ListProperty<String> getCmd()
-
getEntrypoint
@Input @Optional public final ListProperty<String> getEntrypoint()
-
getNetworkAliases
@Input @Optional public final ListProperty<String> getNetworkAliases()
-
getVolumes
@Input @Optional public final ListProperty<String> getVolumes()
-
getExposedPorts
@Input public final ListProperty<DockerCreateContainer.ExposedPort> getExposedPorts()
-
getLabels
@Input @Optional public final MapProperty<String,String> getLabels()
-
getContainerIdFile
@OutputFile public final RegularFileProperty getContainerIdFile()
Output file containing the container ID of the container created. Defaults to "$buildDir/.docker/$taskpath-containerId.txt". If path contains ':' it will be replaced by '_'.
-
getContainerId
@Internal public final Property<String> getContainerId()
The ID of the container created. The value of this property requires the task action to be executed.
-
getPlatform
@Input @Optional public final Property<String> getPlatform()
The target platform in the formatos[/arch[/variant]]
, for examplelinux/s390x
ordarwin
.- Since:
- 7.1.0
-
getHostConfig
public final DockerCreateContainer.HostConfig getHostConfig()
-
getHealthCheck
public final DockerCreateContainer.HealthCheckConfig getHealthCheck()
-
runRemoteCommand
public void runRemoteCommand() throws IOException
- Specified by:
runRemoteCommand
in classAbstractDockerRemoteApiTask
- Throws:
IOException
-
-