containerfile

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package containerfile parses and validates the supported Containerfile subset.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(path string, cf *File) error

Validate ensures a parsed file uses only the supported instruction subset.

Types

type File

type File struct{ Instructions []Instruction }

func ParseFile

func ParseFile(path string) (*File, error)

ParseFile parses and validates a Containerfile or Dockerfile.

type Instruction

type Instruction struct {
	Op       string
	Args     string
	Flags    []string
	Tokens   []string
	JSON     bool
	Line     int
	Original string
}

type UnsupportedError added in v1.0.4

type UnsupportedError struct {
	Path    string
	Line    int
	Op      string
	Message string
	Hint    string
}

UnsupportedError describes Containerfile syntax outside ocimage's supported subset.

func (*UnsupportedError) Error added in v1.0.4

func (e *UnsupportedError) Error() string

Error formats e with file and line context.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL