-
Notifications
You must be signed in to change notification settings - Fork 173
/
Dockerfile
10 lines (7 loc) · 898 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
FROM mcr.microsoft.com/powershell
ARG VERSION=latest
RUN pwsh -c "if ('${VERSION}' -eq 'latest') { Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force} else { Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force -RequiredVersion ${VERSION} }"
RUN pwsh -c "if ('${VERSION}' -eq 'latest') { Install-Module Microsoft.Graph.Beta -Scope CurrentUser -AllowClobber -Force} else { Install-Module Microsoft.Graph.Beta -Scope CurrentUser -AllowClobber -Force -RequiredVersion ${VERSION} }"
RUN pwsh -c "if (!(Test-Path -Path \$PROFILE)) { New-Item -ItemType File -Path \$PROFILE -Force } echo 'Import-Module Microsoft.Graph.Authentication' >> \$PROFILE"
LABEL description="# Welcome to Microsoft Graph PowerShell \
To start learning about the module checkout the [getting started documentation](https://docs.microsoft.com/en-us/powershell/microsoftgraph/get-started)"