Table of Contents

Class DockerOperations

Namespace
Ando.Operations
Assembly
ando.dll

Docker CLI operations for building container images. Methods register steps in the workflow rather than executing immediately.

public class DockerOperations : OperationsBase
Inheritance
DockerOperations
Inherited Members

Constructors

DockerOperations(StepRegistry, IBuildLogger, Func<ICommandExecutor>, GitHubAuthHelper?)

Docker CLI operations for building container images. Methods register steps in the workflow rather than executing immediately.

public DockerOperations(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory, GitHubAuthHelper? gitHubAuthHelper = null)

Parameters

registry StepRegistry
logger IBuildLogger
executorFactory Func<ICommandExecutor>
gitHubAuthHelper GitHubAuthHelper

Methods

Build(string, Action<DockerBuildOptions>?)

Builds a Docker image from a Dockerfile using buildx. Supports single or multi-platform builds, with optional push to registry.

public void Build(string dockerfile, Action<DockerBuildOptions>? configure = null)

Parameters

dockerfile string

Path to the Dockerfile or directory containing it.

configure Action<DockerBuildOptions>

Configuration for the build.

Install()

Installs the Docker CLI in the container. Required before using Docker.Build when running with --dind.

public void Install()

IsAvailable()

Checks if Docker CLI is available and the Docker daemon is accessible. Use this to conditionally skip operations that require Docker. This executes immediately (not registered as a step).

public bool IsAvailable()

Returns

bool

True if Docker is available and working, false otherwise.