Documentation
¶
Index ¶
- type ApplicationFlags
- type BuildApplication
- func (app *BuildApplication) AddCleanup(fn func() error)
- func (app *BuildApplication) CLIName() string
- func (app *BuildApplication) Cleanup() error
- func (app *BuildApplication) CommanderDefault() error
- func (app *BuildApplication) GetCommandDescription(cmd string) string
- func (app *BuildApplication) Help()
- func (app *BuildApplication) PostFlagParse() error
- func (app *BuildApplication) Version() error
- type BuildFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationFlags ¶
type ApplicationFlags struct {
HelpFlag bool `commander:"flag=help,Display usage information for Makisu."`
LogOutput string `commander:"flag=log-output,The output file path for the logs."`
LogLevel string `commander:"flag=log-level,The level at which to log."`
LogFormat string `commander:"flag=log-fmt,The format of the logs."`
Profile bool `commander:"flag=cpu-profile,Profile the application."`
}
ApplicationFlags contains all of the flags for the top level CLI app.
type BuildApplication ¶
type BuildApplication struct {
ApplicationFlags `commander:"flagstruct"`
BuildFlags `commander:"flagstruct=build"`
// contains filtered or unexported fields
}
BuildApplication contains the bindings for the `makisu build` command.
func NewBuildApplication ¶
func NewBuildApplication() *BuildApplication
NewBuildApplication returns a new instance of application. The version of the application is used as a seed to any cache ID computation, so different versions will result in a break of caching layers.
func (*BuildApplication) AddCleanup ¶
func (app *BuildApplication) AddCleanup(fn func() error)
AddCleanup adds a cleanup function to run after the application exits.
func (*BuildApplication) CLIName ¶
func (app *BuildApplication) CLIName() string
CLIName returns the name of the application. Commander uses this when showing usage information.
func (*BuildApplication) Cleanup ¶
func (app *BuildApplication) Cleanup() error
Cleanup cleans up the application after it has run its command.
func (*BuildApplication) CommanderDefault ¶ added in v0.1.1
func (app *BuildApplication) CommanderDefault() error
CommanderDefault gets called automatically when no subcommand is invoked.
func (*BuildApplication) GetCommandDescription ¶
func (app *BuildApplication) GetCommandDescription(cmd string) string
GetCommandDescription returns the description of the given application command. This is used by commander when displaying the help messages.
func (*BuildApplication) Help ¶
func (app *BuildApplication) Help()
Help displays the usage of makisu.
func (*BuildApplication) PostFlagParse ¶
func (app *BuildApplication) PostFlagParse() error
PostFlagParse initializes the standard logger and sets up profiling if need be. This implements the commander.PostFlagParseHook interface, so this function will get called after the Application struct gets injected with the values taken from the flags and arguments of the CLI; but before any of the Build/Pull (etc...) functions get called.
func (*BuildApplication) Version ¶ added in v0.1.1
func (app *BuildApplication) Version() error
Version displays the version of the makisu binary in use.
type BuildFlags ¶
type BuildFlags struct {
DockerfilePath string `commander:"flag=f,The absolute path to the dockerfile"`
Tag string `commander:"flag=t,image tag (required)"`
Arguments map[string]string `commander:"flag=build-args,Arguments to the dockerfile as per the spec of ARG. Format is a json object."`
Destination string `commander:"flag=dest,Destination of the image tar."`
PushRegistries string `commander:"flag=push,Push image after build to the comma-separated list of registries."`
RegistryConfig string `` /* 154-byte string literal not displayed */
AllowModifyFS bool `commander:"flag=modifyfs,Allow makisu to touch files outside of its own storage dir."`
Commit string `` /* 146-byte string literal not displayed */
Blacklist string `` /* 149-byte string literal not displayed */
DockerHost string `commander:"flag=docker-host,Docker host to load images to."`
DockerVersion string `commander:"flag=docker-version,Version string for loading images to docker."`
DockerScheme string `commander:"flag=docker-scheme,Scheme for api calls to docker daemon."`
DoLoad bool `commander:"flag=load,Load image after build."`
RedisCacheAddress string `commander:"flag=redis-cache-addr,The address of a redis cache server for cacheID to layer sha mapping."`
CacheTTL int `commander:"flag=cache-ttl,The TTL of cacheID-sha mapping entries in seconds"`
StorageDir string `` /* 223-byte string literal not displayed */
CompressionLevelStr string `commander:"flag=compression,Image compression level, could be 'no', 'speed', 'size', 'default'."`
// contains filtered or unexported fields
}
BuildFlags contains all of the flags for `makisu build ...`
func (BuildFlags) Build ¶
func (cmd BuildFlags) Build(contextDir string) error
Build image from the specified dockerfile. If -push is specified, will also push the image to those registries. If -load is specified, will load the image into the local docker daemon.
func (BuildFlags) GetTargetRegistries ¶
func (cmd BuildFlags) GetTargetRegistries() []string
GetTargetRegistries returns the target registries that the image should be pushed to.