Class Dockerfile.From
- java.lang.Object
-
- com.bmuschko.gradle.docker.tasks.image.Dockerfile.From
-
- Enclosing class:
- Dockerfile
public static class Dockerfile.From extends Object
Input data for aDockerfile.FromInstruction
.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getImage()
Returns the base image.String
getPlatform()
Returns the platform.String
getStage()
Returns the stage.Dockerfile.From
withPlatform(String platform)
Sets the platform by adding--platform
to theFROM
instruction.Dockerfile.From
withStage(String stage)
Sets a new build stage by addingAS
name to theFROM
instruction.
-
-
-
Constructor Detail
-
From
public From(String image)
-
-
Method Detail
-
withStage
public Dockerfile.From withStage(String stage)
Sets a new build stage by addingAS
name to theFROM
instruction.- Parameters:
stage
- The stage- Returns:
- This instruction
-
withPlatform
public Dockerfile.From withPlatform(String platform)
Sets the platform by adding--platform
to theFROM
instruction.- Parameters:
platform
- The platform- Returns:
- This instruction
-
getImage
public String getImage()
Returns the base image.- Returns:
- The base image
-
getStage
@Nullable public String getStage()
Returns the stage.- Returns:
- The stage
-
getPlatform
@Nullable public String getPlatform()
Returns the platform.- Returns:
- The platform
-
-