Closed endejoli closed 5 years ago
That is a nanoserver image so lacks full .NET, current Powershell bootstrapper relies on full windows
You could try this CoreCLR one to see if that works with your container https://github.com/csharpfritz/CoreWiki/blob/dev/build.ps1
with CoreCLR bootstrap fie I got below errors
PS C:\dotnet> .\build.ps1 Add-Type : Cannot find path 'C:\dotnet\System.IO.Compression.Filesystem.dll' because it does not exist. At C:\dotnet\build.ps1:15 char:1
+ CategoryInfo : ObjectNotFound: (C:\dotnet\Sy....Filesystem.dll:String) [Add-Type], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.AddTypeCommand
Installing Cake 0.26.1... New-Object : Cannot find type [System.Net.WebClient]: verify that the assembly containing this type is loaded. At C:\dotnet\build.ps1:31 char:7
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
Exception calling "ExtractToDirectory" with "2" argument(s): "Could not find file 'C:\dotnet\tools\Cake.zip'." At C:\dotnet\build.ps1:21 char:5
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException
Remove-Item : Cannot find path 'C:\dotnet\tools\Cake.zip' because it does not exist. At C:\dotnet\build.ps1:33 char:6
+ CategoryInfo : ObjectNotFound: (C:\dotnet\tools\Cake.zip:String) [Remove-Item], ItemNotFoundExceptio
n
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
No executable found matching command "dotnet-C:\dotnet\tools\Cake.CoreCLR.0.26.1\Cake.dll"
This should be fixed by #70
While executing Powershell bootstrap script inside docker container
Method invocation failed because [System.Reflection.Assembly] does not contain a method named 'LoadWithPartialName'. At C:\dotnet\build.ps1:90 char:1
Preparing to run build script... Could not download packages.config. At C:\dotnet\build.ps1:152 char:9
$PSVersionTable.PSVersion shows powershell version is 5
Major Minor Build Revision
5 1 14393 1000
Environment? Windows 10
Dockerfile
FROM microsoft/aspnetcore-build ADD . c:\dotnet