Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions tools/autorest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM mcr.microsoft.com/powershell:7.1.3-ubuntu-18.04

# Install dependencies and clean up
RUN apt-get update \
&& apt-get install -y curl \
&& curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \
&& . /root/.bashrc \
&& nvm install 14.15.5 \
&& npm config set unsafe-perm true \
&& npm install -g autorest \
&& npm install -g dotnet-sdk-2.1 \
&& apt-get -o Acquire::Check-Valid-Until=false install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& locale-gen $LANG && update-locale

RUN mkdir -p /src

WORKDIR /src

CMD [ "bash" ]
22 changes: 22 additions & 0 deletions tools/autorest/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# All-in-One Docker Image for Azure PowerShell Code Generation
Packages contained in the image.
* PowerShell 6.2.4
* NodeJS 14.15.5
* Latest autorest
* Dotnet SDK 2.1

# How to Build the Image
`docker build -t autorest ./`

# Launch the Image
`docker run -it -v <path-to-your-source>:/src autorest`

# Code Generation vs Build vs Run
## Code Generation
`autorest`
## Build
`pwsh build-module.ps1`
## Run
`pwsh run-module.ps1`
## Playback Test
`pwsh test-module.ps1`