reader

package
v0.0.0-...-5b8b77a Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFromBytes

func ReadFromBytes(input []byte) ([]interface{}, error)

ReadFromBytes reads commands from bytes. The bytes most often will be the Dockerfile string literal converted to bytes.

func ReadFromBytesWithOriginalSource

func ReadFromBytesWithOriginalSource(input []byte, originalSource string) ([]interface{}, error)

ReadFromBytesWithOriginalSource reads commands from bytes and passes the original source to the build context. Use this method to automatically resolve the ADD / COPY dependencies.

func ReadFromParserResult

func ReadFromParserResult(parserResult *parser.Result, originalSource string) ([]interface{}, error)

ReadFromParserResult reads commands from the Dockerfile parser result.

Types

type ReadResult

type ReadResult interface {
	Commands() []interface{}
	ExcludePatterns() []string
}

ReadResult contains the parsed commands and optionally .dockerignore patterns.

func ReadFromString

func ReadFromString(input string, tempDirectory string) (ReadResult, error)

ReadFromString reads commands from string.

  • literal Dockerfile content, ADD and COPY will not work
  • http:// or http:// URL
  • SPECIAL: git+http:// and git+https:// URL the format is: git+http(s)://host:port/path/to/repo.git:/path/to/Dockerfile[#<commit-hash | branch-name | tag-name>]
  • ssh://, git:// or git+ssh:// URL
  • absolute path to the local file

Jump to

Keyboard shortcuts

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