Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DockerfileTemplateFuncMap = template.FuncMap{ "join": strings.Join, "snippet": func(name string) (string, error) { switch name { case "fetch-repro-get": return dockerfileFetchReproGetSnippet, nil } return "", fmt.Errorf("unknown snippet name %q", name) }, }
View Source
var ErrNotImplemented = errors.New("the specified distro driver does not implement the requested feature")
Functions ¶
This section is empty.
Types ¶
type Distro ¶
type Distro interface { // Info returns the distro driver info. Info() Info // GenerateHash generates hash files. GenerateHash(ctx context.Context, hw HashWriter, opts HashOpts) error // InspectFile inspects a file InspectFile(ctx context.Context, sp filespec.FileSpec, opts InspectFileOpts) (*FileInfo, error) // InstallPackages installs the packages. The packages must be cached. InstallPackages(ctx context.Context, c *cache.Cache, pkgs []filespec.FileSpec, opts InstallOpts) error // GenerateDockerfile generates dockerfiles. GenerateDockerfile(ctx context.Context, dir string, args DockerfileTemplateArgs, opts DockerfileOpts) error }
Distro is a distro driver.
type DockerfileOpts ¶
type DockerfileOpts struct {
GenerateHash bool
}
type DockerfileTemplateArgs ¶
type DockerfileTemplateArgs struct { BaseImage string BaseImageOrig string Packages []string OCIArchDashVariant string Providers []string ReproGetVersion string // e.g., "v0.1.0" ReproGetSHASHA string // sha256sum of SHA256SUMS, e.g., "a23ee0e0a2a2e940809b968befc84aa928323c86d3f4eef1f1653c96c2861632" for https://github.com/reproducible-containers/repro-get/releases/download/v0.1.0/SHA256SUMS }
func (*DockerfileTemplateArgs) WriteToFile ¶
func (a *DockerfileTemplateArgs) WriteToFile(f, tmpl string) error
type HashWriter ¶
func NewHashWriter ¶
func NewHashWriter(w io.Writer) HashWriter
type InspectFileOpts ¶ added in v0.2.0
type InspectFileOpts struct {
CheckInstalled bool // can be slow
}
type InstallOpts ¶
Click to show internal directories.
Click to hide internal directories.