public class BuildImage
@Inject
public BuildImage(@NotNull
org.gradle.api.model.ObjectFactory objectFactory,
@NotNull
org.gradle.api.file.ProjectLayout projectLayout,
@NotNull
org.gradle.api.file.FileSystemOperations fsOps)
@NotNull public com.bmuschko.gradle.docker.DockerRegistryCredentials getRegistryCredentials()
The target Docker registry credentials for usage with a task.
public void registryCredentials(@Nullable
org.gradle.api.Action<? super com.bmuschko.gradle.docker.DockerRegistryCredentials> action)
Configures the target Docker registry credentials for use with a task.
public void registryCredentials(@NotNull
groovy.lang.Closure<com.bmuschko.gradle.docker.DockerRegistryCredentials> c)
Set the credentials for the task.
c - closure with Docker registry credentials.@InputFiles @NotNull public org.gradle.api.file.ConfigurableFileCollection getSrcFiles()
Additional files to build the image.
@InputFile @Optional @NotNull public org.gradle.api.file.RegularFileProperty getDockerfile()
The Dockerfile to use to build the image. If null, will use 'Dockerfile' in the build context, i.e. "Dockerfile" in the srcfiles.
@Input @Optional @NotNull public org.gradle.api.provider.SetProperty<java.lang.String> getImages()
The images including repository, image name and tag used e.g. {@code vieux/apache:2.0}.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.Boolean> getNoCache()
When {@code true}, do not use docker cache when building the image.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.Boolean> getRemove()
When {@code true}, remove intermediate containers after a successful build.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.Boolean> getQuiet()
When {@code true}, suppress the build output and print image ID on success.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.Boolean> getPull()
When {@code true}, always attempt to pull a newer version of the image.
@Input @Optional @NotNull public org.gradle.api.provider.MapProperty<java.lang.String,java.lang.String> getLabels()
Labels to attach as metadata for to the image.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.String> getNetwork()
Networking mode for the RUN instructions during build.
@Input @Optional @NotNull public org.gradle.api.provider.MapProperty<java.lang.String,java.lang.String> getBuildArgs()
Build-time variables to pass to the image build.
@Input @Optional @NotNull public org.gradle.api.provider.SetProperty<java.lang.String> getCacheFrom()
Images to consider as cache sources.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.Long> getShmSize()
Size of {@code /dev/shm} in bytes. The size must be greater than 0. If omitted the system uses 64MB.
@Input @Optional @NotNull public org.gradle.api.provider.Property<java.lang.String> getTarget()
With this parameter it is possible to build a special stage in a multi-stage Docker file.
@Input @Optional @NotNull public org.gradle.api.provider.SetProperty<java.lang.String> getExtraHosts()
Build-time additional host list to pass to the image build in the format {@code host:ip}.
@OutputFile @NotNull public org.gradle.api.file.RegularFileProperty getImageIdFile()
Output file containing the image ID of the built image. Defaults to "$buildDir/.docker/$taskpath-imageId.txt". If path contains ':' it will be replaced by '_'.
@NotNull public org.gradle.api.provider.Property<java.lang.String> getImageId()
The id of the image built.
@Input @NotNull public org.gradle.api.provider.Property<java.lang.String> getDirname()
@Internal @NotNull public org.gradle.api.provider.Property<java.lang.Boolean> getEnabled()
public void runRemoteCommand()
@NotNull public org.gradle.api.file.ProjectLayout getProjectLayout()
public void setProjectLayout(@NotNull
org.gradle.api.file.ProjectLayout p)
@NotNull public org.gradle.api.file.FileSystemOperations getFsOps()
public void setFsOps(@NotNull
org.gradle.api.file.FileSystemOperations p)