Documentation
¶
Overview ¶
Package buildctx prepares the context directory of an image build (#45, ADR-0061): a Dockerfile given as text, or an uploaded tar archive extracted safely.
Index ¶
Constants ¶
const ( // MaxSize bounds the extracted bytes of an archive. MaxSize = 2 << 30 // MaxDockerfile bounds a Dockerfile given as text. MaxDockerfile = 1 << 20 )
Limits of an extracted archive.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
Extract extracts a tar archive, optionally gzip-compressed, into dir. Every file is created through an os.Root of dir, so neither "..", absolute names nor symbolic links can write outside it. Device files and other special entries are skipped. The archive may hold at most maxSize bytes (MaxSize when 0).
func WriteDockerfile ¶
WriteDockerfile writes a Dockerfile given as text into the empty context dir.
Types ¶
This section is empty.