docker_file

package
v1.2.31 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add struct {
	Options []AddOption
	Src     SrcType
	Srcs    []SrcType
	Dest    DestType
}

Add ADD [OPTIONS] <src> ... <dest> ADD [OPTIONS] ["<src>", ... "<dest>"]

type AddOption

type AddOption string
const (
	KeepGitDir AddOption = "--keep-git-dir" //	1.1
	Checksum   AddOption = "--checksum"     //	1.6
	Chown      AddOption = "--chown"        //
	Chmod      AddOption = "--chmod"        //1.2
	Link       AddOption = "--link"         //1.4
	Exclude    AddOption = "--exclude"      //1.7-labs
)

type Arg

type Arg struct {
	Kv  KeyEqVal
	Kvs KeyEqVal
}

Arg ARG <name>[=<default value>] [<name>[=<default value>]...]

type Builder

type Builder interface {
	Build(w io.StringWriter)
}

type Cmd

type Cmd struct{ Exe }

Cmd CMD ["executable","param1","param2"] (exec form) CMD ["param1","param2"] (exec form, as default parameters to ENTRYPOINT) CMD command param1 param2 (shell form)

type Copy

type Copy struct {
	Options []CopyOption
	Src     SrcType
	Srcs    []SrcType
	Dest    DestType
}

Copy COPY [OPTIONS] <src> ... <dest> COPY [OPTIONS] ["<src>", ... "<dest>"]

type CopyOption

type CopyOption string
const (
	CopyOptFrom    CopyOption = "--from"
	CopyOptChown   CopyOption = "--chown"
	CopyOptChmod   CopyOption = "--chmod"   //	1.2
	CopyOptLink    CopyOption = "--link"    // 1.4
	CopyOptParents CopyOption = "--parents" //1.7-labs
	CopyOptExclude CopyOption = "--exclude" // 1.7-labs
)

type DestType

type DestType string

type Doc

type Doc struct {
}

type Entrypoint

type Entrypoint struct{ Exe }

Entrypoint ENTRYPOINT ["/bin/bash", "-c", "echo hello"]

type Env

type Env struct {
	Kv  KeyEqVal
	Kvs []KeyEqVal
}

Env ENV <key>=<value> [<key>=<value>...]

type Exe

type Exe struct {
	Bin   string
	Param []string
}

func (Exe) Build

func (e Exe) Build(w io.StringWriter)

func (Exe) Exec

func (e Exe) Exec(w io.StringWriter)

INSTRUCTION ["executable","param1","param2"]

func (Exe) Shell

func (e Exe) Shell(w io.StringWriter)

INSTRUCTION command param1 param2

type Expose

type Expose struct {
	Port     int
	Protocol string
}

Expose EXPOSE <port> [<port>/<protocol>...]

type From

type From struct {
	Platform *string
	Image    Image
	AsName   *string
}

From FROM [--platform=<platform>] <image> [AS <name>] FROM [--platform=<platform>] <image>[:<tag>] [AS <name>] FROM [--platform=<platform>] <image>[@<digest>] [AS <name>]

type HealthCheck

type HealthCheck struct {
}

type Image

type Image struct {
	Repository string
	Tag        *string
	Digest     *string
}

type KeyEqVal

type KeyEqVal struct {
	Key string
	Val string
}

type Label

type Label struct {
	Kv  KeyEqVal
	Kvs []KeyEqVal
}

Label LABEL <key>=<value> [<key>=<value>...]

type MountType

type MountType string

MountType RUN --mount=[type=<TYPE>][,option=<value>[,option=<value>]...]

const (
	Bind   MountType = "bind"
	Cache  MountType = "cache"
	Tmpfs  MountType = "tmpfs"
	Secret MountType = "secret"
	SSH    MountType = "ssh"
)

type NetworkType

type NetworkType string

NetworkType RUN --network=<TYPE>

const (
	Default NetworkType = "default"
	None    NetworkType = "none"
	Host    NetworkType = "host"
)

type OnBuild

type OnBuild struct {
	Instruction string
}

OnBuild ONBUILD <INSTRUCTION>

type Run

type Run struct {
	Exe
	Options []RunOption
}

Run +format(Shell form): RUN [OPTIONS] <command> ... +format(Exec form): RUN [OPTIONS] [ "<command>", ... ] +example: RUN source $HOME/.bashrc && echo $HOME

type RunOption

type RunOption string
const (
	Mount    RunOption = "--mount"    // Minimum Dockerfile version 1.2
	Network  RunOption = "--network"  // Minimum Dockerfile version 1.3
	Security RunOption = "--security" // Minimum Dockerfile version 1.1.2-labs
)

type SecurityType

type SecurityType string

SecurityType RUN --security=<sandbox|insecure>

const (
	Sandbox  SecurityType = "sandbox"
	Insecure SecurityType = "insecure"
)

type Shell

type Shell struct{ Exe }

Shell SHELL ["executable", "parameters"]

type ShellExecForm

type ShellExecForm interface {
	Builder
	Exec(w io.StringWriter)
	Shell(w io.StringWriter)
}

type SrcType

type SrcType string

type StopSignal

type StopSignal struct {
	Signal string
}

StopSignal STOPSIGNAL signal

type User

type User struct {
	URep string
	GRep *string
}

User USER <user>[:<group>] USER <UID>[:<GID>]

type Volume

type Volume struct {
	Dir []string
}

Volume VOLUME ["/data"]

type Workdir

type Workdir struct {
	Dir string
}

Workdir WORKDIR /path/to/workdir

Jump to

Keyboard shortcuts

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