Docker Community Forums

Share and learn in the Docker community.

Generate_IIS:You cannot call a method on a null-valued expression when using ConvertTo-Dockerfile command in powershell

docker
build

(Tgiinter) #1

when I give the following command
ConvertTo-Dockerfile -Local -OutputPath F:\Docker\Docker -Artifact IIS -Verbose in powershell.It generates the following error.Here by I attached the verbose logs.

PS C:\WINDOWS\system32> ConvertTo-Dockerfile -Local -OutputPath F:\Docker\Docker -Artifact IIS -Verbose
VERBOSE: Using local drive: C:
VERBOSE: Starting conversion process
VERBOSE: Started discovering IIS artifact
VERBOSE: Checking IIS ApplicationHost config for Windows Version: 10.0
VERBOSE: Target Image Version 10.0.17134.112
VERBOSE: IIS service is present on the system
VERBOSE: ASP.NET is present on the system
VERBOSE: .NET 3.5 is present on the system
VERBOSE: Finished discovering IIS artifact
VERBOSE: Generating Dockerfile based on discovered artifacts in :C:
VERBOSE: Generating result for IIS component
VERBOSE: Copying IIS configuration files
VERBOSE: Writing instruction to create site Default Web Site
VERBOSE: Processing source directory: C:\inetpub\wwwroot
VERBOSE: Copying content from source: C:\inetpub\wwwroot, to: F:\Docker\Docker
VERBOSE: Creating web app iDe
VERBOSE: Processing source directory: E:\iIn\iDi\iS\Dyna
Generate_IIS : You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.5\Functions\Private\GenerateDockerfile.ps1:34 char:23

  • … ockerfile = & “Generate_$Artifact” -MountPath $MountPath -ManifestPat …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:slight_smile: [Generate_IIS], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull,Generate_IIS