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 Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,309 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,101 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--