Documentation
¶
Index ¶
- Variables
- func BuildContainerfile(recipe *api.Recipe) error
- func BuildModule(recipe *api.Recipe, moduleInterface interface{}) ([]string, error)
- func BuildRecipe(recipePath string) (api.Recipe, error)
- func BuildShellModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)
- func ChangeWorkingDirectory(workdir string, containerfile *os.File) error
- func CompileRecipe(recipePath string, runtime string, isRoot bool, origGid int, origUid int) error
- func GenModule(modulePath string) (map[string]interface{}, error)
- func GetContainerStorage(runtime string) (cstorage.Store, error)
- func GetImageID(name string, store cstorage.Store) (string, error)
- func GetTopLayerID(imageid string, store cstorage.Store) (string, error)
- func LoadRecipe(path string) (*api.Recipe, error)
- func MountImage(imagename string, imageid string, runtime string) (string, error)
- func RestoreWorkingDirectory(workdir string, containerfile *os.File) error
- func TestRecipe(path string) (*api.Recipe, error)
- type Finalize
- type IncludesModule
- type Module
- type ModuleCommand
- type Plugin
- type ShellModule
- type StorageConf
Constants ¶
This section is empty.
Variables ¶
var Min_Recipe_Version = []uint8{1, 0, 0}
Functions ¶
func BuildContainerfile ¶
Generate a Containerfile from the recipe
func BuildModule ¶
Build a command string for the given module in the recipe
func BuildRecipe ¶
Load and build a Containerfile from the specified recipe
func BuildShellModule ¶ added in v0.2.1
Build shell module commands and return them as a single string
Returns: Concatenated shell commands or an error if any step fails
func ChangeWorkingDirectory ¶ added in v0.7.3
Add a WORKDIR instruction to the containerfile
func CompileRecipe ¶ added in v0.2.4
Compile and build the recipe using the specified runtime
func GetContainerStorage ¶ added in v0.8.0
Retrieve the container storage configuration based on the runtime
func GetImageID ¶ added in v0.8.0
Retrieve the image ID for a given image name from the storage
func GetTopLayerID ¶ added in v0.8.0
Retrieve the top layer ID for a given image ID from the storage
func LoadRecipe ¶
LoadRecipe loads a recipe from a file and returns a Recipe Does not validate the recipe but it will catch some errors a proper validation will be done in the future
func MountImage ¶ added in v0.8.0
Mount the image and return the mount directory
func RestoreWorkingDirectory ¶ added in v0.7.3
Add a WORKDIR instruction to reset to the root directory
Types ¶
type Finalize ¶ added in v0.8.0
type Finalize struct { Name string `json:"name"` Type string `json:"type"` Content []byte // The entire module unparsed as a []byte, used by plugins }
Configuration for finalization steps
type IncludesModule ¶ added in v0.3.2
type IncludesModule struct { Name string `json:"name"` Type string `json:"type"` Includes []string `json:"includes"` }
Configuration for including other modules or recipes
type Module ¶
type Module struct { Name string `json:"name"` Workdir string Type string `json:"type"` Modules []map[string]interface{} Content []byte // The entire module unparsed as a []byte, used by plugins }
Configuration for a module
type ModuleCommand ¶
Information for building a module
func BuildModules ¶
func BuildModules(recipe *api.Recipe, modules []interface{}) ([]ModuleCommand, error)
Build commands for each module in the recipe
type Plugin ¶ added in v0.3.2
type Plugin struct { Name string BuildFunc func(*C.char, *C.char) string LoadedPlugin uintptr PluginInfo api.PluginInfo }
Configuration for a plugin
type ShellModule ¶ added in v0.3.2
type ShellModule struct { Name string `json:"name"` Type string `json:"type"` Sources []api.Source Commands []string }
Configuration for shell modules
type StorageConf ¶ added in v0.8.0
Configuration for storage drivers