Documentation
¶
Index ¶
- func GetDockerClient(ctx context.Context) (cli client.APIClient, err error)
- func GetHostInfo(ctx context.Context) (info types.Info, err error)
- func ImageExistsLocally(ctx context.Context, imageName string, platform string) (bool, error)
- func LoadDockerAuthConfig(ctx context.Context, image string) (types.AuthConfig, error)
- func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor
- func NewDockerPullExecutor(input NewDockerPullExecutorInput) common.Executor
- func NewDockerVolumeRemoveExecutor(volume string, force bool) common.Executor
- func RemoveImage(ctx context.Context, imageName string, force bool, pruneChildren bool) (bool, error)
- func RunnerArch(ctx context.Context) string
- type Container
- type FileEntry
- type NewContainerInput
- type NewDockerBuildExecutorInput
- type NewDockerPullExecutorInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDockerClient ¶ added in v0.2.9
func GetHostInfo ¶ added in v0.2.26
func ImageExistsLocally ¶
ImageExistsLocally returns a boolean indicating if an image with the requested name, tag and architecture exists in the local docker image store
func LoadDockerAuthConfig ¶ added in v0.2.26
func NewDockerBuildExecutor ¶
func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor
NewDockerBuildExecutor function to create a run executor for the container
func NewDockerPullExecutor ¶
func NewDockerPullExecutor(input NewDockerPullExecutorInput) common.Executor
NewDockerPullExecutor function to create a run executor for the container
func NewDockerVolumeRemoveExecutor ¶ added in v0.2.2
func RemoveImage ¶ added in v0.2.22
func RemoveImage(ctx context.Context, imageName string, force bool, pruneChildren bool) (bool, error)
RemoveImage removes image from local store, the function is used to run different container image architectures
func RunnerArch ¶ added in v0.2.31
Arch fetches values from docker info and translates architecture to GitHub actions compatible runner.arch values https://github.com/github/docs/blob/main/data/reusables/actions/runner-arch-description.md
Types ¶
type Container ¶ added in v0.2.2
type Container interface { Create(capAdd []string, capDrop []string) common.Executor Copy(destPath string, files ...*FileEntry) common.Executor CopyDir(destPath string, srcPath string, useGitIgnore bool) common.Executor GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error) Pull(forcePull bool) common.Executor Start(attach bool) common.Executor Exec(command []string, env map[string]string, user, workdir string) common.Executor UpdateFromEnv(srcPath string, env *map[string]string) common.Executor UpdateFromImageEnv(env *map[string]string) common.Executor UpdateFromPath(env *map[string]string) common.Executor Remove() common.Executor Close() common.Executor ReplaceLogWriter(io.Writer, io.Writer) (io.Writer, io.Writer) }
Container for managing docker run containers
func NewContainer ¶ added in v0.2.2
func NewContainer(input *NewContainerInput) Container
NewContainer creates a reference to a container
type NewContainerInput ¶ added in v0.2.2
type NewContainerInput struct { Image string Username string Password string Entrypoint []string Cmd []string WorkingDir string Env []string Binds []string Mounts map[string]string Name string Stdout io.Writer Stderr io.Writer NetworkMode string Privileged bool UsernsMode string Platform string Options string }
NewContainerInput the input for the New function