INNER CODE UNIT · Go
awaitDockerClient
nicholas-fedor/watchtower · cmd/root.go:884
func awaitDockerClient(log *zerolog.Logger) {
log.Debug().
Msg("Sleeping for a second to ensure the docker api client has been properly initialized.")
sleepFunc(1 * time.Second)
}
// resolveCurrentWatchtowerContainerForFallback resolves the current Watchtower container
// for use in the orchestrator fallback path.
//
// It attempts to detect the current container ID and retrieve the container object,
// returning nil if any step fails.
//
// Parameters:
// - ctx: Context for cancellation and timeouts.
// - c: Container client for Docker API operations.
//
// Returns:
// - types.Container: The resolved Watchtower container, or nil if detection fails.