Skip to content

Commit ade5ecd

Browse files
authored
Add -Scope AllUsers to docker images (Azure#12995)
1 parent 06a8f77 commit ade5ecd

4 files changed

+4
-4
lines changed

docker/Dockerfile-alpine-3.10

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
3131

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

3737
# create AzureRmContextSettings.json before it was generated

docker/Dockerfile-centos-7

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
3131

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

3737
# create AzureRmContextSettings.json before it was generated

docker/Dockerfile-debian-9

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
3131

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

3737
# create AzureRmContextSettings.json before it was generated

docker/Dockerfile-ubuntu-18.04

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
3131

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

3737
# create AzureRmContextSettings.json before it was generated

0 commit comments

Comments
 (0)