{"modulePath":"github.com/mintoolkit/mint","version":"v0.0.0-20261102071007-1bc8c79add0d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package imagebuilder\n\n## Variables\n\n```go\nvar (\n\tErrInvalidContextDir = errors.New(\"invalid context directory\")\n)\n```\n\n## Types\n\n```go\ntype DataParams struct {\n\tTargetPath string\n}\n```\n\n```go\ntype DockerfileBuildEngine interface {\n\tName() string\n\tBuild(options DockerfileBuildOptions) error\n}\n```\n\n```go\ntype DockerfileBuildOptions struct {\n\tDockerfile   string\n\tBuildContext string\n\tIgnoreFile   string\n\tImagePath    string\n\tBuildArgs    []NVParam\n\tLabels       map[string]string\n\tTarget       string\n\tNetworkMode  string\n\tExtraHosts   string //already a comma separated list\n\tCacheFrom    []string\n\tCacheTo      []string\n\tPlatforms    []string\n\tOutputStream io.Writer\n}\n```\n\n```go\ntype HealthConfig struct {\n\tTest          []string      `json:\",omitempty\"`\n\tInterval      time.Duration `json:\",omitempty\"`\n\tTimeout       time.Duration `json:\",omitempty\"`\n\tStartPeriod   time.Duration `json:\",omitempty\"`\n\tStartInterval time.Duration `json:\",omitempty\"`\n\tRetries       int           `json:\",omitempty\"`\n}\n```\n\n```go\ntype History struct {\n\tCreated    string `json:\"created,omitempty\"`\n\tAuthor     string `json:\"author,omitempty\"`\n\tCreatedBy  string `json:\"created_by,omitempty\"`\n\tComment    string `json:\"comment,omitempty\"`\n\tEmptyLayer bool   `json:\"empty_layer,omitempty\"`\n}\n```\n\n```go\ntype ImageConfig struct {\n\tCreated      time.Time `json:\"created,omitempty\"`\n\tAuthor       string    `json:\"author,omitempty\"`\n\tArchitecture string    `json:\"architecture\"`\n\tOS           string    `json:\"os\"`\n\tOSVersion    string    `json:\"os.version,omitempty\"`\n\tOSFeatures   []string  `json:\"os.features,omitempty\"`\n\tVariant      string    `json:\"variant,omitempty\"`\n\tConfig       RunConfig `json:\"config\"`\n\tRootFS       *RootFS   `json:\"rootfs\"` //not used building images\n\tHistory      []History `json:\"history,omitempty\"`\n\tAddHistory   []History `json:\"add_history,omitempty\"` //extra field\n\t//Extra fields\n\tContainer     string `json:\"container,omitempty\"`\n\tDockerVersion string `json:\"docker_version,omitempty\"`\n\t//More extra fields\n\tID      string `json:\"id,omitempty\"`\n\tComment string `json:\"comment,omitempty\"`\n}\n```\nImageConfig 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/opencontainers/image-spec/blob/main/config.md#properties) \\* [https://github.com/moby/moby/blob/e1c92184f08153456ecbf5e302a851afd6f28e1c/image/image.go#LL40C6-L40C13](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\n\n```go\ntype ImageResult struct {\n\tID        string   `json:\"id,omitempty\"`\n\tDigest    string   `json:\"digest,omitempty\"`\n\tName      string   `json:\"name,omitempty\"`\n\tOtherTags []string `json:\"other_tags,omitempty\"`\n}\n```\n\n```go\ntype LayerDataInfo struct {\n\tType            LayerSourceType\n\tSource          string\n\tParams          *DataParams\n\tEntrypointLayer bool\n\tResetCmd        bool\n}\n```\n\n```go\ntype LayerSourceType string\n```\n\n```go\nconst (\n\tTarSource      LayerSourceType = \"lst.tar\"\n\tDirSource      LayerSourceType = \"lst.dir\"\n\tFileSource     LayerSourceType = \"lst.file\"\n\tFileListSource LayerSourceType = \"lst.file_list\"\n)\n```\n\n```go\ntype NVParam struct {\n\tName  string\n\tValue string\n}\n```\n\n```go\ntype RootFS struct {\n\tType    string   `json:\"type\"`\n\tDiffIDs []string `json:\"diff_ids,omitempty\"`\n}\n```\n\n```go\ntype RunConfig struct {\n\tUser               string              `json:\"User,omitempty\"`\n\tExposedPorts       map[string]struct{} `json:\"ExposedPorts,omitempty\"`\n\tAddExposedPorts    map[string]struct{} `json:\"AddExposedPorts,omitempty\"`    //extra field\n\tRemoveExposedPorts []string            `json:\"RemoveExposedPorts,omitempty\"` //extra field\n\tEnv                []string            `json:\"Env,omitempty\"`\n\tAddEnv             []string            `json:\"AddEnv,omitempty\"` //extra field\n\tEntrypoint         []string            `json:\"Entrypoint,omitempty\"`\n\tIsShellEntrypoint  bool                `json:\"IsShellEntrypoint,omitempty\"` //extra field\n\tCmd                []string            `json:\"Cmd,omitempty\"`\n\tIsShellCmd         bool                `json:\"IsShellCmd,omitempty\"` //extra field\n\tVolumes            map[string]struct{} `json:\"Volumes,omitempty\"`\n\tAddVolumes         map[string]struct{} `json:\"AddVolumes,omitempty\"` //extra field\n\tWorkingDir         string              `json:\"WorkingDir,omitempty\"`\n\tLabels             map[string]string   `json:\"Labels,omitempty\"`\n\tAddLabels          map[string]string   `json:\"AddLabels,omitempty\"` //extra field\n\tStopSignal         string              `json:\"StopSignal,omitempty\"`\n\tArgsEscaped        bool                `json:\"ArgsEscaped,omitempty\"`\n\tHealthcheck        *HealthConfig       `json:\"Healthcheck,omitempty\"`\n\t//Extra fields\n\tAttachStderr    bool     `json:\"AttachStderr,omitempty\"`\n\tAttachStdin     bool     `json:\"AttachStdin,omitempty\"`\n\tAttachStdout    bool     `json:\"AttachStdout,omitempty\"`\n\tDomainname      string   `json:\"Domainname,omitempty\"`\n\tHostname        string   `json:\"Hostname,omitempty\"`\n\tImage           string   `json:\"Image,omitempty\"`\n\tOnBuild         []string `json:\"OnBuild,omitempty\"`\n\tOpenStdin       bool     `json:\"OpenStdin,omitempty\"`\n\tStdinOnce       bool     `json:\"StdinOnce,omitempty\"`\n\tTty             bool     `json:\"Tty,omitempty\"`\n\tNetworkDisabled bool     `json:\"NetworkDisabled,omitempty\"`\n\tMacAddress      string   `json:\"MacAddress,omitempty\"`\n\tStopTimeout     *int     `json:\"StopTimeout,omitempty\"`\n\tShell           []string `json:\"Shell,omitempty\"`\n}\n```\nRunConfig 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](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](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\n\n```go\ntype SimpleBuildEngine interface {\n\tName() string\n\tBuild(options SimpleBuildOptions) (*ImageResult, error)\n}\n```\n\n```go\ntype SimpleBuildOptions struct {\n\tFrom             string\n\tFromTar          string\n\tTags             []string\n\tLayers           []LayerDataInfo\n\tImageConfig      *ImageConfig\n\tHideBuildHistory bool\n\tOutputImageTar   string\n}\n```\n\n```go\nfunc SimpleBuildOptionsFromDockerfile(path string, ignoreExeInstructions bool) (*SimpleBuildOptions, error)\n```\n\n```go\nfunc SimpleBuildOptionsFromDockerfileData(data string, ignoreExeInstructions bool) (*SimpleBuildOptions, error)\n```\n\n```go\nfunc SimpleBuildOptionsFromImageConfig(data *ImageConfig) (*SimpleBuildOptions, error)\n```\n\n","path":"github.com/mintoolkit/mint/pkg/imagebuilder","name":"imagebuilder","synopsis":"","isRedistributable":true}
