Skip to contents

Check if a dockerfile has a specific instruction

Usage

has_instruction(dockerfile, instruction)

Arguments

dockerfile

A dockerfile object

instruction

Instruction to check for (e.g., "FROM", "RUN")

Value

TRUE if instruction exists, FALSE otherwise