azuredocker

Azd-Up Command Package Issue


I am following the Azure Developer CLI Documentation to learn more about Azure's CLI features and more.

Following the document steps:

  1. Run the azd init command to initialize the template:

    $ azd init -t hello-azd
    
  2. Run the azd up command to package, provision and deploy the app resources:

    $ azd up
    

I then come up across this error:

(x) Failed: Packaging service aca

ERROR: error executing step command 'package --all': failed building service 'aca': building container: aca at .: building image: exit code: 1, stdout: , stderr: time="2025-03-07T01:53:55Z" level=warning msg="No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load"
error: Cannot connect to the Docker daemon at unix:///home/example/.docker/run/docker.sock. Is the docker daemon running?

I am kind of new to Azure and some of the main services it offers/has.

Is there any like efficient or reliable way to solving this because I want to learn Azure for a company I work for.

Thank you!


Solution

  • \> (x) Failed: Packaging service aca

    ERROR: error executing step command 'package --all': failed building service 'aca': building container: aca at .: building image: exit code: 1, stdout: , stderr: time="2025-03-07T01:53:55Z" level=warning msg="No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load"

    error: Cannot connect to the Docker daemon at unix:///home/example/.docker/run/docker.sock. Is the docker daemon running?

    The error occurs because Docker Desktop is either not installed or not running on your local machine.

    To avoid above error run the Docker Desktop after running below command:

    azd init -t hello-azd
    

    If Docker Desktop is not installed, you can install it using this below links

    For windows.

    For Linux.

    I successfully created the hello-azd image by running azd init -t hello-azd.

    enter image description here

    Before running the azd up command, I started Docker Desktop and then executed azd up, successfully creating the resource in Azure, as shown below.

    enter image description hereenter image description here