Class Dockerfile.GenericInstruction
java.lang.Object
com.bmuschko.gradle.docker.tasks.image.Dockerfile.GenericInstruction
- All Implemented Interfaces:
Dockerfile.Instruction
- Enclosing class:
- Dockerfile
An instruction that uses the provided value as-is without any additional formatting.
Use this instruction if you want to provide a very complex instruction or if there's not a specific implementation of Dockerfile.Instruction
that serves your use case.
-
Constructor Summary
ConstructorDescriptionGenericInstruction
(String instruction) GenericInstruction
(Provider<String> instructionProvider) -
Method Summary
Modifier and TypeMethodDescriptionGets the keyword of the instruction as used in the Dockerfile.getText()
Gets the full text of the instruction as used in the Dockerfile.
-
Constructor Details
-
GenericInstruction
-
GenericInstruction
-
-
Method Details
-
getKeyword
Gets the keyword of the instruction as used in the Dockerfile.For example the keyword of the
Dockerfile.FromInstruction
isFROM
.- Specified by:
getKeyword
in interfaceDockerfile.Instruction
- Returns:
- The instruction keyword
-
getText
Gets the full text of the instruction as used in the Dockerfile.- Specified by:
getText
in interfaceDockerfile.Instruction
- Returns:
- The instruction
-