I'm trying to set up a Docker image from microsoft/nanoserver with this Dockerfile
FROM microsoft/nanoserver
SHELL ["powershell"]
RUN [System.Environment]::OSVersion
RUN Install-PackageProvider NuGet -Force -RequiredVersion 2.8.5.205
RUN Install-PackageProvider -Force NanoServerPackage
RUN Import-PackageProvider NanoServerPackage
RUN Install-NanoServerPackage -Name Microsoft-NanoServer-IIS-Package
# ...
CMD ["ping", "-t", "localhost"]
The line installing Microsoft-NanoServer-IIS-Package gives me this error:
Step 7/12 : RUN Install-NanoServerPackage -Name Microsoft-NanoServer-IIS-Package
---> Running in 81eac4a5af3e
ConvertFrom-Json : Unexpected end when deserializing object. Path '', line 1, position 5.
At C:\Program Files\WindowsPowerShell\Modules\NanoServerPackage\1.0.1.0\NanoServerPackage.psm1:833 char:44
+ $searchData = $searchFileContent | ConvertFrom-Json
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [ConvertFrom-Json], JsonSerializationException
+ FullyQualifiedErrorId : Newtonsoft.Json.JsonSerializationException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
The command 'powershell Install-NanoServerPackage -Name Microsoft-NanoServer-IIS-Package' returned a non-zero code: 1
So I commented out the one line, built the image, started a container, and opened a shell:
> docker build -t iis_test .
> docker run -it iis_test powershell
Then on the container I get a similar error:
PS C:\> find-nanoserverPackage -name *
WARNING: Unexpected end when deserializing object. Path '', line 1, position 5.
PS C:\>
I'm not sure what these two errors mean---it looks like they're not downloading JSON. Any idea what to do from there?