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 a Dockerfile.FromInstruction.
Since:
4.0.0
  • Constructor Details

    • From

      public From(String image)
  • Method Details

    • withStage

      public Dockerfile.From withStage(String stage)
      Sets a new build stage by adding AS name to the FROM instruction.
      Parameters:
      stage - The stage
      Returns:
      This instruction
    • withPlatform

      public Dockerfile.From withPlatform(String platform)
      Sets the platform by adding --platform to the FROM 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