Unable to use AZ cloud shell to run swagger.sh with dockers

Saeed Misaghian 20 Reputation points
2023-05-23T16:38:44.8766667+00:00

I am trying to run swagger.sh in Azure cloud shell, and in the swagger.sh file, we have docker.

Capture

I try to "bash swagger.sh" where I get the following error, asking to run docker.

Capture2

The problem:

If I need to run Docker, it asks for a password, but not accepting any password and it seems it's a Azure Cloud Shell limitation that is not accepting sudo command. (Azure Cloud Shell limitations | Microsoft Learn & Sudo Privileges required in Azure Cloud Shell - Microsoft Q&A :***Capture3


So what should I do now? Indeed, how can I run this .sh file to see the swagger document on my local server. Any help please?

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,771 Reputation points
    2023-05-24T10:40:03.0633333+00:00

    Hello there,

    Run the Connect-AzureAD cmdlet. Previously, Cloud Shell ran this cmdlet automatically during PowerShell startup. To speed up start time, the cmdlet no longer runs automatically. You can choose to restore the previous behavior by adding Connect-AzureAD to the $PROFILE file in PowerShell.

    Simplest way is to try the below steps.

    1/ Run

    npx open-swagger-ui <path or URL>

    2/ Navigate to http://localhost:3355/

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--


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.