-
Notifications
You must be signed in to change notification settings - Fork 155
Unable to install module on nanoserver #417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey! I believe you need to pass the |
Hello, Thanks for your quick response 😄 It tried, but I did not saw any change. PS C:\> Install-Module -Name Pester -Force -Scope CurrentUser
WARNING: Win32Helpers: Cannot add type. Compilation errors occurred.
WARNING: Could not find a part of the path 'C:\Users\ContainerAdministrator\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\PSRepositories.xml'
.
Install-Package: C:\program files\powershell\Modules\PowerShellGet\PSModule.psm1:9685
Line |
9685 | … talledPackages = PackageManagement\Install-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The module 'Pester' cannot be installed or updated because the authenticode signature of the file 'Pester.psd1' is not valid.
|
Hmm. Not sure what is going on here. |
for pester, or any signed package, you must specify, |
Thanks |
I added a known issues wiki and i'll update the readme to link to this soon:
|
This gets the module installed - but the current nanoserver image does not have the ContainerUser module path as part of the PSModulePath ENV variable. So you end up not being able to use the module unless you also alter the PSModulePath. This is further complicated by not being able to edit the registry of the base image to create a new image with the C:\Users\ContainerUser\Documents\Powershell\Modules path added to the PSModulePath environment variable, so you have to do it yourself (via some kind of entrypoint script). |
@identifi-awilliamson, please file an issue for this, so we can put this on our backlog. This is probably a PowerShell/.NET bug but we can fix it here. |
Done! - #492 |
Thanks for filing an issue. I can't make promises on when it will be done but I put in on the list for the MSFT team to do, but anyone is free to submit a PR in the meantime. Although, some refactoring of the Windows images is in progress. |
Thanks for filing an issue. I can't make promises on when it will be done but I put in on the list for the MSFT team to do, but anyone is free to submit a PR in the meantime. Although some refactoring of the Windows images is in progress. |
Steps to reproduce
Using windows container
Expected behavior
I expect this command to work (it works on ubuntu, alpine, windowsservercore).
I expect modules to be loaded.
Actual behavior
With Pester
With NetworkingDsc
Environment data
docker info
##Workaround
I can get the module installed with additionnal command
The text was updated successfully, but these errors were encountered: