Documentation
¶
Index ¶
- Constants
- func ResolveImage(templateOpts map[string]string) string
- type Buildkitd
- func (b *Buildkitd) Close() error
- func (b *Buildkitd) Logs(ctx context.Context, w io.Writer, follow bool) error
- func (b *Buildkitd) Start(ctx context.Context, imageRef string, hostPort int) error
- func (b *Buildkitd) Status(ctx context.Context) (docker.ContainerStatus, error)
- func (b *Buildkitd) Stop(ctx context.Context, remove bool) error
Constants ¶
View Source
const ( // BuildkitdContainerName is the well-known name used for the local buildkitd container. BuildkitdContainerName = "containerhive-buildkitd" // BuildkitdDefaultPort is the host port the buildkitd container binds to. BuildkitdDefaultPort = 8372 )
Variables ¶
This section is empty.
Functions ¶
func ResolveImage ¶
ResolveImage returns the full "image:tag" for the buildkitd container resolved from template_options (ci_buildkit_image, ci_buildkit_version), falling back to project defaults.
Types ¶
type Buildkitd ¶
type Buildkitd struct {
// contains filtered or unexported fields
}
Buildkitd manages the lifecycle of the local buildkitd container.
func NewBuildkitd ¶
NewBuildkitd creates a Buildkitd manager using Docker settings from the environment.
func (*Buildkitd) Logs ¶
Logs streams stdout and stderr of the buildkitd container to w. When follow is true the stream stays open until ctx is cancelled or the container exits.
func (*Buildkitd) Start ¶
Start pulls the image if absent, creates and starts the buildkitd container. Returns an error if the container is already running.
Click to show internal directories.
Click to hide internal directories.