Skip to content

Commit

Permalink
Add -Scope AllUsers to docker images (Azure#12995)
Browse files Browse the repository at this point in the history
  • Loading branch information
dingmeng-xue authored Sep 21, 2020
1 parent 06a8f77 commit ade5ecd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile-alpine-3.10
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-centos-7
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-debian-9
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-ubuntu-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down

0 comments on commit ade5ecd

Please sign in to comment.