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