AzureStaticWebApp@0 failing on docker: command not found with Azure Pool

Brian Kitt 0 Reputation points
2024-12-13T19:40:43.71+00:00

I have an Azure Static Web App
I created an agent pool in Azure
I have a CI/CD pipeline that keeps failing with 'docker: command not found'

I get it's telling me that docker is not installed. But I'm using a standard 'out of the box' Azure pool. Why is that not working?

The error message:
Starting: AzureStaticWebApp

==============================================================================

Task : Deploy Azure Static Web App

Description : [PREVIEW] Build and deploy an Azure Static Web App

Version : 0.247.3

Author : Microsoft Corporation

Help : https://aka.ms/swadocs

==============================================================================

/usr/bin/bash /mnt/vss/_tasks/AzureStaticWebApp{{Redacted}}/0.247.3/launch-docker.sh

/mnt/vss/_work/tasks/AzureStaticWebApp{{Redacted}}/0.247.3/launch-docker.sh: line 1: docker: command not found

- task: AzureStaticWebApp@0
  inputs:
    skip_app_build: true
    skip_api_build: true
    verbose: true
    app_location: '$(build.artifactstagingdirectory)'
    output_location: '/output'
    azure_static_web_apps_api_token: $(deployment_token)
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,020 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 12,395 Reputation points
    2024-12-16T09:49:28.35+00:00

    Hello , Welcome to MS Q&A

    If Docker is unavailable, ensure you are using the correct Azure-hosted pool. Update your pipeline YAML to explicitly set ubuntu-latest (or another supported agent):

    pool:
      vmImage: 'ubuntu-latest'
    
    

    Note: Azure-hosted ubuntu-latest comes preinstalled with Docker CLI and the Docker Engine.

    To help you more or with exact solution pls help with more error details .

    Kindly accept answer if it helps

    Thanks

    Deepanshu


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.