auth

suspend fun DockerClient.auth(authConfig: AuthConfig): Result<SystemAuthResponse, ErrorResponse>

Validates registry credentials through Docker and stores successful authentication in DockerClientConfig.auth.

Stores the identity token when supplied, otherwise the supplied username/password. A failed response leaves existing authentication unchanged. Credentials are neither read from Docker CLI helpers nor persisted.

Return

Docker authentication response or daemon error. Transport/decoding failures and cancellation can throw.

Parameters

authConfig

Registry credentials and optional server address; absent address selects Docker Hub.