Documentation
¶
Index ¶
- Constants
- func ImageCommand(args map[string]interface{}, command func(stageImage *Stage) error) (map[string]interface{}, error)
- func ShelloutPack(command string) string
- type BuildOptions
- type BuilderContainer
- type CmdStage
- type Container
- type ContainerOptions
- type Dimg
- type Image
- type Stage
- func (i *Stage) Build(options BuildOptions) error
- func (i *Stage) BuilderContainer() BuilderContainer
- func (i *Stage) Commit() error
- func (i *Stage) Container() Container
- func (i *Stage) Export(name string) error
- func (i Stage) GetInspect() (*types.ImageInspect, error)
- func (i *Stage) ID() string
- func (i *Stage) Import(name string) error
- func (i *Stage) Introspect() error
- func (i *Stage) IsExists() bool
- func (i *Stage) Labels() map[string]string
- func (i *Stage) MustGetId() (string, error)
- func (i *Stage) MustGetInspect() (*types.ImageInspect, error)
- func (i Stage) Name() string
- func (i *Stage) Pull() error
- func (i *Stage) Push() error
- func (i Stage) ResetInspect() error
- func (i *Stage) SaveInCache() error
- func (i *Stage) SyncDockerState() error
- func (i *Stage) Tag(name string) error
- func (i Stage) Untag() error
- type StageBuilderContainer
- func (c *StageBuilderContainer) AddEnv(envs map[string]string)
- func (c *StageBuilderContainer) AddExpose(exposes ...string)
- func (c *StageBuilderContainer) AddLabel(labels map[string]string)
- func (c *StageBuilderContainer) AddRunCommands(commands ...string)
- func (c *StageBuilderContainer) AddServiceRunCommands(commands ...string)
- func (c *StageBuilderContainer) AddVolume(volumes ...string)
- func (c *StageBuilderContainer) AddVolumeFrom(volumesFrom ...string)
- type StageContainer
- func (c *StageContainer) AddRunCommands(commands ...string)
- func (c *StageContainer) AddServiceRunCommands(commands ...string)
- func (c *StageContainer) CommitChangeOptions() ContainerOptions
- func (c *StageContainer) Name() string
- func (c *StageContainer) RunOptions() ContainerOptions
- func (c *StageContainer) ServiceCommitChangeOptions() ContainerOptions
- type StageContainerOptions
- func (co *StageContainerOptions) AddCmd(cmds ...string)
- func (co *StageContainerOptions) AddEntrypoint(entrypoints ...string)
- func (co *StageContainerOptions) AddEnv(envs map[string]string)
- func (co *StageContainerOptions) AddExpose(exposes ...string)
- func (co *StageContainerOptions) AddLabel(labels map[string]string)
- func (co *StageContainerOptions) AddOnbuild(onbuilds ...string)
- func (co *StageContainerOptions) AddUser(user string)
- func (co *StageContainerOptions) AddVolume(volumes ...string)
- func (co *StageContainerOptions) AddVolumeFrom(volumesFrom ...string)
- func (co *StageContainerOptions) AddWorkdir(workdir string)
Constants ¶
View Source
const StageContainerNamePrefix = "dapp.build."
Variables ¶
This section is empty.
Functions ¶
func ImageCommand ¶
func ShelloutPack ¶
Types ¶
type BuildOptions ¶
type BuilderContainer ¶
type CmdStage ¶
type CmdStage struct {
From *CmdStage `json:"from"`
Name string `json:"name"`
ContainerName string `json:"container_name"`
BuiltId string `json:"built_id"`
BashCommands []string `json:"bash_commands"`
ServiceBashCommands []string `json:"service_bash_commands"`
Options *StageContainerOptions `json:"options"`
ChangeOptions *StageContainerOptions `json:"change_options"`
ServiceChangeOptions *StageContainerOptions `json:"service_change_options"`
ImageInspect *types.ImageInspect `json:"image_inspect"`
BuiltImageInspect *types.ImageInspect `json:"built_image_inspect"`
}
type Container ¶ added in v1.2.223
type Container interface {
Name() string
AddServiceRunCommands(commands ...string)
AddRunCommands(commands ...string)
RunOptions() ContainerOptions
CommitChangeOptions() ContainerOptions
ServiceCommitChangeOptions() ContainerOptions
}
type ContainerOptions ¶
type ContainerOptions interface {
AddVolume(volumes ...string)
AddVolumeFrom(volumesFrom ...string)
AddExpose(exposes ...string)
AddEnv(envs map[string]string)
AddLabel(labels map[string]string)
AddCmd(cmds ...string)
AddOnbuild(onbuilds ...string)
AddWorkdir(workdir string)
AddUser(user string)
AddEntrypoint(entrypoints ...string)
}
type Dimg ¶
type Dimg struct {
*Stage
}
func NewDimgImage ¶
func (Dimg) GetInspect ¶
func (i Dimg) GetInspect() (*types.ImageInspect, error)
func (Dimg) ResetInspect ¶
func (i Dimg) ResetInspect() error
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
func NewStageImage ¶
func (*Stage) Build ¶
func (i *Stage) Build(options BuildOptions) error
func (*Stage) BuilderContainer ¶
func (i *Stage) BuilderContainer() BuilderContainer
func (Stage) GetInspect ¶
func (i Stage) GetInspect() (*types.ImageInspect, error)
func (*Stage) Introspect ¶
func (*Stage) MustGetInspect ¶
func (i *Stage) MustGetInspect() (*types.ImageInspect, error)
func (Stage) ResetInspect ¶
func (i Stage) ResetInspect() error
func (*Stage) SaveInCache ¶
func (*Stage) SyncDockerState ¶
type StageBuilderContainer ¶
type StageBuilderContainer struct {
// contains filtered or unexported fields
}
func (*StageBuilderContainer) AddEnv ¶
func (c *StageBuilderContainer) AddEnv(envs map[string]string)
func (*StageBuilderContainer) AddExpose ¶
func (c *StageBuilderContainer) AddExpose(exposes ...string)
func (*StageBuilderContainer) AddLabel ¶
func (c *StageBuilderContainer) AddLabel(labels map[string]string)
func (*StageBuilderContainer) AddRunCommands ¶
func (c *StageBuilderContainer) AddRunCommands(commands ...string)
func (*StageBuilderContainer) AddServiceRunCommands ¶
func (c *StageBuilderContainer) AddServiceRunCommands(commands ...string)
func (*StageBuilderContainer) AddVolume ¶
func (c *StageBuilderContainer) AddVolume(volumes ...string)
func (*StageBuilderContainer) AddVolumeFrom ¶
func (c *StageBuilderContainer) AddVolumeFrom(volumesFrom ...string)
type StageContainer ¶
type StageContainer struct {
// contains filtered or unexported fields
}
func (*StageContainer) AddRunCommands ¶
func (c *StageContainer) AddRunCommands(commands ...string)
func (*StageContainer) AddServiceRunCommands ¶
func (c *StageContainer) AddServiceRunCommands(commands ...string)
func (*StageContainer) CommitChangeOptions ¶
func (c *StageContainer) CommitChangeOptions() ContainerOptions
func (*StageContainer) Name ¶
func (c *StageContainer) Name() string
func (*StageContainer) RunOptions ¶
func (c *StageContainer) RunOptions() ContainerOptions
func (*StageContainer) ServiceCommitChangeOptions ¶
func (c *StageContainer) ServiceCommitChangeOptions() ContainerOptions
type StageContainerOptions ¶
type StageContainerOptions struct {
Volume []string `json:"volume"`
VolumesFrom []string `json:"volumes-from"`
Expose []string `json:"expose"`
Env map[string]string `json:"env"`
Label map[string]string `json:"label"`
Cmd []string `json:"cmd"`
Onbuild []string `json:"onbuild"`
Workdir string `json:"workdir"`
User string `json:"user"`
Entrypoint []string `json:"entrypoint"`
}
func (*StageContainerOptions) AddCmd ¶
func (co *StageContainerOptions) AddCmd(cmds ...string)
func (*StageContainerOptions) AddEntrypoint ¶
func (co *StageContainerOptions) AddEntrypoint(entrypoints ...string)
func (*StageContainerOptions) AddEnv ¶
func (co *StageContainerOptions) AddEnv(envs map[string]string)
func (*StageContainerOptions) AddExpose ¶
func (co *StageContainerOptions) AddExpose(exposes ...string)
func (*StageContainerOptions) AddLabel ¶
func (co *StageContainerOptions) AddLabel(labels map[string]string)
func (*StageContainerOptions) AddOnbuild ¶
func (co *StageContainerOptions) AddOnbuild(onbuilds ...string)
func (*StageContainerOptions) AddUser ¶
func (co *StageContainerOptions) AddUser(user string)
func (*StageContainerOptions) AddVolume ¶
func (co *StageContainerOptions) AddVolume(volumes ...string)
func (*StageContainerOptions) AddVolumeFrom ¶
func (co *StageContainerOptions) AddVolumeFrom(volumesFrom ...string)
func (*StageContainerOptions) AddWorkdir ¶
func (co *StageContainerOptions) AddWorkdir(workdir string)
Click to show internal directories.
Click to hide internal directories.