Documentation ¶
Index ¶
- Variables
- type Builder
- type Cache
- type ContainerOperation
- type DefaultPhaseFactory
- type LifecycleExecution
- func (l *LifecycleExecution) Analyze(ctx context.Context, repoName, cacheName, networkMode string, ...) error
- func (l *LifecycleExecution) AppPath() string
- func (l *LifecycleExecution) AppVolume() string
- func (l *LifecycleExecution) Build(ctx context.Context, networkMode string, volumes []string, ...) error
- func (l *LifecycleExecution) Builder() Builder
- func (l *LifecycleExecution) Cleanup() error
- func (l *LifecycleExecution) Create(ctx context.Context, publish, clearCache bool, ...) error
- func (l *LifecycleExecution) Detect(ctx context.Context, networkMode string, volumes []string, ...) error
- func (l *LifecycleExecution) Export(ctx context.Context, repoName string, runImage string, publish bool, ...) error
- func (l *LifecycleExecution) LayersVolume() string
- func (l *LifecycleExecution) PlatformAPI() *api.Version
- func (l *LifecycleExecution) Restore(ctx context.Context, cacheName, networkMode string, phaseFactory PhaseFactory) error
- func (l *LifecycleExecution) Run(ctx context.Context, phaseFactoryCreator PhaseFactoryCreator) error
- type LifecycleExecutor
- type LifecycleOptions
- type Phase
- type PhaseConfigProvider
- func (p *PhaseConfigProvider) ContainerConfig() *container.Config
- func (p *PhaseConfigProvider) ContainerOps() []ContainerOperation
- func (p *PhaseConfigProvider) ErrorWriter() io.Writer
- func (p *PhaseConfigProvider) HostConfig() *container.HostConfig
- func (p *PhaseConfigProvider) InfoWriter() io.Writer
- func (p *PhaseConfigProvider) Name() string
- type PhaseConfigProviderOperation
- func WithArgs(args ...string) PhaseConfigProviderOperation
- func WithBinds(binds ...string) PhaseConfigProviderOperation
- func WithContainerOperations(operations ...ContainerOperation) PhaseConfigProviderOperation
- func WithDaemonAccess() PhaseConfigProviderOperation
- func WithEnv(envs ...string) PhaseConfigProviderOperation
- func WithFlags(flags ...string) PhaseConfigProviderOperation
- func WithImage(image string) PhaseConfigProviderOperation
- func WithLifecycleProxy(lifecycleExec *LifecycleExecution) PhaseConfigProviderOperation
- func WithLogPrefix(prefix string) PhaseConfigProviderOperation
- func WithNetwork(networkMode string) PhaseConfigProviderOperation
- func WithRegistryAccess(authConfig string) PhaseConfigProviderOperation
- func WithRoot() PhaseConfigProviderOperation
- type PhaseFactory
- type PhaseFactoryCreator
- type RunnerCleaner
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v0.10.0
type Builder interface { Name() string UID() int GID() int LifecycleDescriptor() builder.LifecycleDescriptor Stack() builder.StackMetadata Image() imgutil.Image }
type ContainerOperation ¶ added in v0.12.0
type ContainerOperation func(ctrClient client.CommonAPIClient, ctx context.Context, containerID string, stdout, stderr io.Writer) error
func CopyDir ¶ added in v0.12.0
func CopyDir(src, dst string, uid, gid int, os string, fileFilter func(string) bool) ContainerOperation
CopyDir copies a local directory (src) to the destination on the container while filtering files and changing it's UID/GID.
func EnsureVolumeAccess ¶ added in v0.14.0
func EnsureVolumeAccess(uid, gid int, os string, volumeNames ...string) ContainerOperation
EnsureVolumeAccess grants full access permissions to volumes for UID/GID-based user When UID/GID are 0 it grants explicit full access to BUILTIN\Administrators and any other UID/GID grants full access to BUILTIN\Users Changing permissions on volumes through stopped containers does not work on Docker for Windows so we start the container and make change using icacls See: https://github.com/moby/moby/issues/40771
func WriteStackToml ¶ added in v0.12.0
func WriteStackToml(dstPath string, stack builder.StackMetadata, os string) ContainerOperation
WriteStackToml writes a `stack.toml` based on the StackMetadata provided to the destination path.
type DefaultPhaseFactory ¶ added in v0.10.0
type DefaultPhaseFactory struct {
// contains filtered or unexported fields
}
func (*DefaultPhaseFactory) New ¶ added in v0.10.0
func (m *DefaultPhaseFactory) New(provider *PhaseConfigProvider) RunnerCleaner
type LifecycleExecution ¶ added in v0.13.0
type LifecycleExecution struct {
// contains filtered or unexported fields
}
func NewLifecycleExecution ¶ added in v0.13.0
func NewLifecycleExecution(logger logging.Logger, docker client.CommonAPIClient, opts LifecycleOptions) (*LifecycleExecution, error)
func (*LifecycleExecution) Analyze ¶ added in v0.13.0
func (l *LifecycleExecution) Analyze(ctx context.Context, repoName, cacheName, networkMode string, publish, clearCache bool, phaseFactory PhaseFactory) error
func (*LifecycleExecution) AppPath ¶ added in v0.13.0
func (l *LifecycleExecution) AppPath() string
func (*LifecycleExecution) AppVolume ¶ added in v0.13.0
func (l *LifecycleExecution) AppVolume() string
func (*LifecycleExecution) Build ¶ added in v0.13.0
func (l *LifecycleExecution) Build(ctx context.Context, networkMode string, volumes []string, phaseFactory PhaseFactory) error
func (*LifecycleExecution) Builder ¶ added in v0.13.0
func (l *LifecycleExecution) Builder() Builder
func (*LifecycleExecution) Cleanup ¶ added in v0.13.0
func (l *LifecycleExecution) Cleanup() error
func (*LifecycleExecution) Create ¶ added in v0.13.0
func (l *LifecycleExecution) Create( ctx context.Context, publish, clearCache bool, runImage, launchCacheName, cacheName, repoName, networkMode string, volumes []string, phaseFactory PhaseFactory, ) error
func (*LifecycleExecution) Detect ¶ added in v0.13.0
func (l *LifecycleExecution) Detect(ctx context.Context, networkMode string, volumes []string, phaseFactory PhaseFactory) error
func (*LifecycleExecution) Export ¶ added in v0.13.0
func (l *LifecycleExecution) Export(ctx context.Context, repoName string, runImage string, publish bool, launchCacheName, cacheName, networkMode string, phaseFactory PhaseFactory) error
func (*LifecycleExecution) LayersVolume ¶ added in v0.13.0
func (l *LifecycleExecution) LayersVolume() string
func (*LifecycleExecution) PlatformAPI ¶ added in v0.13.0
func (l *LifecycleExecution) PlatformAPI() *api.Version
func (*LifecycleExecution) Restore ¶ added in v0.13.0
func (l *LifecycleExecution) Restore(ctx context.Context, cacheName, networkMode string, phaseFactory PhaseFactory) error
func (*LifecycleExecution) Run ¶ added in v0.13.0
func (l *LifecycleExecution) Run(ctx context.Context, phaseFactoryCreator PhaseFactoryCreator) error
type LifecycleExecutor ¶ added in v0.13.0
type LifecycleExecutor struct {
// contains filtered or unexported fields
}
func NewLifecycleExecutor ¶ added in v0.13.0
func NewLifecycleExecutor(logger logging.Logger, docker client.CommonAPIClient) *LifecycleExecutor
func (*LifecycleExecutor) Execute ¶ added in v0.13.0
func (l *LifecycleExecutor) Execute(ctx context.Context, opts LifecycleOptions) error
type LifecycleOptions ¶
type LifecycleOptions struct { AppPath string Image name.Reference Builder Builder LifecycleImage string RunImage string ClearCache bool Publish bool TrustBuilder bool UseCreator bool HTTPProxy string HTTPSProxy string NoProxy string Network string Volumes []string DefaultProcessType string FileFilter func(string) bool }
type PhaseConfigProvider ¶ added in v0.10.0
type PhaseConfigProvider struct {
// contains filtered or unexported fields
}
func NewPhaseConfigProvider ¶ added in v0.10.0
func NewPhaseConfigProvider(name string, lifecycleExec *LifecycleExecution, ops ...PhaseConfigProviderOperation) *PhaseConfigProvider
func (*PhaseConfigProvider) ContainerConfig ¶ added in v0.10.0
func (p *PhaseConfigProvider) ContainerConfig() *container.Config
func (*PhaseConfigProvider) ContainerOps ¶ added in v0.12.0
func (p *PhaseConfigProvider) ContainerOps() []ContainerOperation
func (*PhaseConfigProvider) ErrorWriter ¶ added in v0.11.0
func (p *PhaseConfigProvider) ErrorWriter() io.Writer
func (*PhaseConfigProvider) HostConfig ¶ added in v0.10.0
func (p *PhaseConfigProvider) HostConfig() *container.HostConfig
func (*PhaseConfigProvider) InfoWriter ¶ added in v0.11.0
func (p *PhaseConfigProvider) InfoWriter() io.Writer
func (*PhaseConfigProvider) Name ¶ added in v0.10.0
func (p *PhaseConfigProvider) Name() string
type PhaseConfigProviderOperation ¶ added in v0.10.0
type PhaseConfigProviderOperation func(*PhaseConfigProvider)
func WithArgs ¶
func WithArgs(args ...string) PhaseConfigProviderOperation
func WithBinds ¶
func WithBinds(binds ...string) PhaseConfigProviderOperation
func WithContainerOperations ¶ added in v0.12.0
func WithContainerOperations(operations ...ContainerOperation) PhaseConfigProviderOperation
func WithDaemonAccess ¶
func WithDaemonAccess() PhaseConfigProviderOperation
func WithEnv ¶ added in v0.11.0
func WithEnv(envs ...string) PhaseConfigProviderOperation
func WithFlags ¶ added in v0.12.0
func WithFlags(flags ...string) PhaseConfigProviderOperation
WithFlags differs from WithArgs as flags are always prepended
func WithImage ¶ added in v0.11.0
func WithImage(image string) PhaseConfigProviderOperation
func WithLifecycleProxy ¶ added in v0.10.0
func WithLifecycleProxy(lifecycleExec *LifecycleExecution) PhaseConfigProviderOperation
func WithLogPrefix ¶ added in v0.11.0
func WithLogPrefix(prefix string) PhaseConfigProviderOperation
WithLogPrefix sets a prefix for logs produced by this phase
func WithNetwork ¶
func WithNetwork(networkMode string) PhaseConfigProviderOperation
func WithRegistryAccess ¶
func WithRegistryAccess(authConfig string) PhaseConfigProviderOperation
func WithRoot ¶
func WithRoot() PhaseConfigProviderOperation
type PhaseFactory ¶ added in v0.10.0
type PhaseFactory interface {
New(provider *PhaseConfigProvider) RunnerCleaner
}
func NewDefaultPhaseFactory ¶ added in v0.10.0
func NewDefaultPhaseFactory(lifecycleExec *LifecycleExecution) PhaseFactory
type PhaseFactoryCreator ¶ added in v0.14.0
type PhaseFactoryCreator func(*LifecycleExecution) PhaseFactory