microsoft/Docker-PowerShell

Cannot install Azure modules on Docker-PowerShell

sakshamgupta1 opened this issue · 1 comments

Output of $PSVersionTable (from a powershell process):

Name                           Value                                                                                                                                                                       
----                           -----                                                                                                                                                                       
PSVersion                      6.0.0-beta                                                                                                                                                                  
PSEdition                      Core                                                                                                                                                                        
BuildVersion                   3.0.0.0                                                                                                                                                                     
CLRVersion                                                                                                                                                                                                 
GitCommitId                    v6.0.0-beta.2                                                                                                                                                               
OS                             Linux 4.9.12-moby #1 SMP Tue Feb 28 12:11:36 UTC 2017                                                                                                                       
Platform                       Unix                                                                                                                                                                        
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                     
PSRemotingProtocolVersion      2.3                                                                                                                                                                         
SerializationVersion           1.1.0.1                                                                                                                                                                     
WSManStackVersion              3.0       

Output of ipmo Docker; (module Docker).Version.ToString() (from a powershell process):

Docker version 17.03.0-ce, build 60ccb22

Steps to reproduce the issue:

  1. docker run -it microsoft/powershell:latest
  2. PS /> Install-Module Azure
  3. PS /> Import-Module Azure
    Import-Module : The specified module 'Azure' was not loaded because no valid module file was found in any module directory.

What actually happened?:
Powershell not picking up newly installed modules. Restarting the container doesn't help

What did you expect to happen?:

Additional information:
OS: MacOS 10.11.3

This looks like it's actually an issue with open source powershell being able to load that module. Since you are using docker directly and not using the Docker-PowerShell cmdlets, this isn't the right repository to file this issue against. Please re-file your issue against https://github.com/powershell/powershell and they should be able to follow up with you there about issues using the Linux powershell image.