Interface Dockerfile.Instruction

All Known Implementing Classes:
Dockerfile.AddFileInstruction, Dockerfile.ArgInstruction, Dockerfile.CommentInstruction, Dockerfile.CopyFileInstruction, Dockerfile.DefaultCommandInstruction, Dockerfile.EntryPointInstruction, Dockerfile.EnvironmentVariableInstruction, Dockerfile.ExposePortInstruction, Dockerfile.FileInstruction, Dockerfile.FromInstruction, Dockerfile.GenericInstruction, Dockerfile.HealthcheckInstruction, Dockerfile.LabelInstruction, Dockerfile.MapInstruction, Dockerfile.OnBuildInstruction, Dockerfile.RunCommandInstruction, Dockerfile.StringArrayInstruction, Dockerfile.StringCommandInstruction, Dockerfile.UserInstruction, Dockerfile.VolumeInstruction, Dockerfile.WorkDirInstruction
Enclosing class:
Dockerfile

public static interface Dockerfile.Instruction
A representation of an instruction in a Dockerfile.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the keyword of the instruction as used in the Dockerfile.
    Gets the full text of the instruction as used in the Dockerfile.
  • Method Details

    • getKeyword

      @Internal @Nullable String getKeyword()
      Gets the keyword of the instruction as used in the Dockerfile.

      For example the keyword of the Dockerfile.FromInstruction is FROM.

      Returns:
      The instruction keyword
    • getText

      @Input @Optional @Nullable String getText()
      Gets the full text of the instruction as used in the Dockerfile.
      Returns:
      The instruction
      Since:
      3.6.0