From 303f48e1a8d9a7463bdae09fd31b8cb540fd36f8 Mon Sep 17 00:00:00 2001 From: dingmeng-xue Date: Thu, 17 Sep 2020 15:54:43 +0800 Subject: [PATCH] Add -Scope AllUsers to docker images --- docker/Dockerfile-alpine-3.10 | 2 +- docker/Dockerfile-centos-7 | 2 +- docker/Dockerfile-debian-9 | 2 +- docker/Dockerfile-ubuntu-18.04 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile-alpine-3.10 b/docker/Dockerfile-alpine-3.10 index 9eae55548942..f213c05f1cff 100644 --- a/docker/Dockerfile-alpine-3.10 +++ b/docker/Dockerfile-alpine-3.10 @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team " \ # 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 diff --git a/docker/Dockerfile-centos-7 b/docker/Dockerfile-centos-7 index 187e25d7ceb1..f258815b6a8c 100644 --- a/docker/Dockerfile-centos-7 +++ b/docker/Dockerfile-centos-7 @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team " \ # 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 diff --git a/docker/Dockerfile-debian-9 b/docker/Dockerfile-debian-9 index e3b2081a55a6..da515ab13a02 100644 --- a/docker/Dockerfile-debian-9 +++ b/docker/Dockerfile-debian-9 @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team " \ # 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 diff --git a/docker/Dockerfile-ubuntu-18.04 b/docker/Dockerfile-ubuntu-18.04 index 4689e8f88c02..c158cf1d651a 100644 --- a/docker/Dockerfile-ubuntu-18.04 +++ b/docker/Dockerfile-ubuntu-18.04 @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team " \ # 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