Documentation ¶
Index ¶
- type DataParams
- type HealthConfig
- type History
- type ImageConfig
- type ImageResult
- type LayerDataInfo
- type LayerSourceType
- type RootFS
- type RunConfig
- type SimpleBuildEngine
- type SimpleBuildOptions
- func SimpleBuildOptionsFromDockerfile(path string, ignoreExeInstructions bool) (*SimpleBuildOptions, error)
- func SimpleBuildOptionsFromDockerfileData(data string, ignoreExeInstructions bool) (*SimpleBuildOptions, error)
- func SimpleBuildOptionsFromImageConfig(data *ImageConfig) (*SimpleBuildOptions, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataParams ¶
type DataParams struct {
TargetPath string
}
type HealthConfig ¶
type ImageConfig ¶
type ImageConfig struct { Created time.Time `json:"created,omitempty"` Author string `json:"author,omitempty"` Architecture string `json:"architecture"` OS string `json:"os"` OSVersion string `json:"os.version,omitempty"` OSFeatures []string `json:"os.features,omitempty"` Variant string `json:"variant,omitempty"` Config RunConfig `json:"config"` RootFS *RootFS `json:"rootfs"` //not used building images History []History `json:"history,omitempty"` //not used building images //Extra fields Container string `json:"container,omitempty"` DockerVersion string `json:"docker_version,omitempty"` //More extra fields ID string `json:"id,omitempty"` Comment string `json:"comment,omitempty"` }
ImageConfig describes the container image configurations (aka ConfigFile or V1Image/Image in other libraries) Fields (ordered according to spec): * https://github.com/opencontainers/image-spec/blob/main/config.md#properties * https://github.com/moby/moby/blob/e1c92184f08153456ecbf5e302a851afd6f28e1c/image/image.go#LL40C6-L40C13 Note: related to pkg/docker/dockerimage/V1ConfigObject|ConfigObject TODO: refactor into one set of common structs later
type ImageResult ¶
type LayerDataInfo ¶
type LayerDataInfo struct { Type LayerSourceType Source string Params *DataParams }
type LayerSourceType ¶
type LayerSourceType string
const ( TarSource LayerSourceType = "lst.tar" DirSource LayerSourceType = "lst.dir" )
type RunConfig ¶
type RunConfig struct { User string `json:"User,omitempty"` ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` Env []string `json:"Env,omitempty"` Entrypoint []string `json:"Entrypoint,omitempty"` Cmd []string `json:"Cmd,omitempty"` Volumes map[string]struct{} `json:"Volumes,omitempty"` WorkingDir string `json:"WorkingDir,omitempty"` Labels map[string]string `json:"Labels,omitempty"` StopSignal string `json:"StopSignal,omitempty"` ArgsEscaped bool `json:"ArgsEscaped,omitempty"` Healthcheck *HealthConfig `json:"Healthcheck,omitempty"` //Extra fields AttachStderr bool `json:"AttachStderr,omitempty"` AttachStdin bool `json:"AttachStdin,omitempty"` AttachStdout bool `json:"AttachStdout,omitempty"` Domainname string `json:"Domainname,omitempty"` Hostname string `json:"Hostname,omitempty"` Image string `json:"Image,omitempty"` OnBuild []string `json:"OnBuild,omitempty"` OpenStdin bool `json:"OpenStdin,omitempty"` StdinOnce bool `json:"StdinOnce,omitempty"` Tty bool `json:"Tty,omitempty"` NetworkDisabled bool `json:"NetworkDisabled,omitempty"` MacAddress string `json:"MacAddress,omitempty"` StopTimeout *int `json:"StopTimeout,omitempty"` Shell []string `json:"Shell,omitempty"` }
RunConfig describes the runtime config parameters for container instances (aka Config in other libraries) Fields (ordered according to spec): Memory, MemorySwap, CpuShares aren't necessary * https://github.com/opencontainers/image-spec/blob/main/config.md#properties (Config field) * https://github.com/moby/moby/blob/master/api/types/container/config.go#L70 Note: related to pkg/docker/dockerimage/ContainerConfig TODO: refactor into one set of common structs later
type SimpleBuildEngine ¶
type SimpleBuildEngine interface { Name() string Build(options SimpleBuildOptions) (*ImageResult, error) }
type SimpleBuildOptions ¶
type SimpleBuildOptions struct { From string Tags []string Layers []LayerDataInfo ImageConfig ImageConfig }
func SimpleBuildOptionsFromDockerfile ¶
func SimpleBuildOptionsFromDockerfile(path string, ignoreExeInstructions bool) (*SimpleBuildOptions, error)
func SimpleBuildOptionsFromDockerfileData ¶
func SimpleBuildOptionsFromDockerfileData(data string, ignoreExeInstructions bool) (*SimpleBuildOptions, error)
func SimpleBuildOptionsFromImageConfig ¶
func SimpleBuildOptionsFromImageConfig(data *ImageConfig) (*SimpleBuildOptions, error)