Azd Provision should support Podman when Docker is not installed
azd version 1.11.0 (commit 5b92e0687e1fa96dfc8292f4b900c0c58610b6a5)
Describe the bug When I run 'azd provision', I get an error telling me that required external tools need to be installed. It says that docker is not installed although I have podman installed and $DOCKER_HOST set to podman. I also tried alias docker=podman.
To Reproduce On a machine without docker but with podman, run 'azd provision'
Expected behavior The azd tools should not naively expect everybody to install docker. A large portion of the developer community only use Podman or some other container runtime. The tools should be able to detect podman or other runtimes when checking for docker.
Environment Information on your environment: * Ubuntu 22.04
Additional context Looking at the azd code, there are lots of places where checks are made to see if the required external tools are installed. In cli/azd/pkg/tools/docker/docker.go, the following function exists
func (d *Cli) CheckInstalled(ctx context.Context) error {
toolName := d.Name()
err := tools.ToolInPath("docker")
if err != nil {
return err
}
dockerRes, err := tools.ExecuteCommand(ctx, d.commandRunner, "docker", "--version")
if err != nil {
return fmt.Errorf("checking %s version: %w", toolName, err)
}
log.Printf("docker version: %s", dockerRes)
supported, err := isSupportedDockerVersion(dockerRes)
if err != nil {
return err
}
if !supported {
return &tools.ErrSemver{ToolName: toolName, VersionInfo: d.versionInfo()}
}
// Check if docker daemon is running
if _, err := tools.ExecuteCommand(ctx, d.commandRunner, "docker", "ps"); err != nil {
return fmt.Errorf("the %s daemon is not running, please start the %s service: %w", toolName, toolName, err)
}
return nil
}