Use AutoRest with docker

July 6, 2022 ยท View on GitHub

AutoRest provide some docker images:

ImageDescriptionUbuntu
azsdkengsys.azurecr.io/azuresdk/autorestBase image with node installed:heavy_check_mark:
azsdkengsys.azurecr.io/azuresdk/autorest-pythonBase image + python 3 For building python sdk:heavy_check_mark:
azsdkengsys.azurecr.io/azuresdk/autorest-dotnetBase image + dotnet. For building csharp sdk:heavy_check_mark:
azsdkengsys.azurecr.io/azuresdk/autorest-javaBase image + java. For building java sdk:heavy_check_mark:
azsdkengsys.azurecr.io/azuresdk/autorest-allBase image with all the languages for building any of the sdk above:heavy_check_mark:

Usage

# Run the autorest image that fits your need(see next section for different options) and mount the current directory to access the openapi spec there.
docker run -v "${pwd}:/specs" -t <autorest-image> \
    --input-file=/specs/openapi.json