Docker with 'Navcontainerhelper' - 'New-NavContainer'

jensthomsen
Member Posts: 173
Hi
I'm trying to get a docker up and running by use of the 'navcontainerhelper', but it doen't work:-( My script looks like this:
install-module navcontainerhelper -force
Write-NavContainerHelperWelcomeText
help new-navcontainer -detailed
New-NavContainer `
-containerName Nav2018CU2 `
-accept_eula `
-memoryLimit 3G `
-imageName "microsoft/dynamics-nav:2018-cu2-dk"`
-licenseFile "C:\NAV Docker Setup\2018-DK\Udvikler NAV 2018 inkl ISV_011217.flf"`
-IncludeCSide `
-doNotExportObjectsToText `
-enableSymbolLoading Y `
-auth Windows
when running it, I first get prompted for user and password which I guess is just my windows credentials? The script terminates with this error:
Get-Item : Cannot find path 'C:\WINDOWS\system32\Y\setup.exe' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.2.6.5\ContainerHandling\New-NavContainer.ps1:170 char:24
+ ... vversion = (Get-Item -Path (Join-Path $navDvdPath "setup.exe")).Versi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\WINDOWS\system32\Y\setup.exe:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
Any ideas?
I'm trying to get a docker up and running by use of the 'navcontainerhelper', but it doen't work:-( My script looks like this:
install-module navcontainerhelper -force
Write-NavContainerHelperWelcomeText
help new-navcontainer -detailed
New-NavContainer `
-containerName Nav2018CU2 `
-accept_eula `
-memoryLimit 3G `
-imageName "microsoft/dynamics-nav:2018-cu2-dk"`
-licenseFile "C:\NAV Docker Setup\2018-DK\Udvikler NAV 2018 inkl ISV_011217.flf"`
-IncludeCSide `
-doNotExportObjectsToText `
-enableSymbolLoading Y `
-auth Windows
when running it, I first get prompted for user and password which I guess is just my windows credentials? The script terminates with this error:
Get-Item : Cannot find path 'C:\WINDOWS\system32\Y\setup.exe' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.2.6.5\ContainerHandling\New-NavContainer.ps1:170 char:24
+ ... vversion = (Get-Item -Path (Join-Path $navDvdPath "setup.exe")).Versi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\WINDOWS\system32\Y\setup.exe:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
Any ideas?
0
Best Answer
-
I've got som help from Freddie on:
https://github.com/Microsoft/nav-docker/issues/167
This solved my problem:-)0
Answers
-
I've tried with NavUserPassword and that worked like a charm.
$secureVMAdminPassword = ConvertTo-SecureSTring 'randompass' -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential ('someusername', $secureVMAdminPassword) New-NavContainer ` -containerName "container" ` -imageName "microsoft/dynamics-nav:devpreview" ` -accept_eula ` -Credential $credential ` -memoryLimit 3G ` -updateHost ` -useSSL ` -includeCSide ` -doNotExportObjectsToText
(remove the auth parameter and include the Credential parameter)
I haven't tried it with Windows authentication yet. I don't know if there are tips and tricks to it.0 -
jensthomsen, I didn't read the full error. It seems that the authentication isn't the problem. You get an error on
Join-Path $navDvdPath "setup.exe"
You have not supplied a NAV DVD folder as parameter when you run New-NavContainer. I did not use that either. So I have looked up the documentation on this parameter withGet-Help New-NavContainer -full
-navDvdPath <String>
When you are spinning up a Generic image, you need to specify the NAV DVD path
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-navDvdCountry <String>
When you are spinning up a Generic image, you need to specify the country version (w1, dk, etc.)
Required? false
Position? 4
Default value w1
Accept pipeline input? false
Accept wildcard characters? false
It seems that the script some how ends up using a generic image. Have you pulled the image you want to use?docker pull microsoft/dynamics-nav:2018-cu2-dk
Has been a while since I've played with this. But I hope this points you in the right direction.0 -
Hi RemkoD
Thx for your answer:-) The last part helped me...sems as my previously downloaded image has disappeared. Adding this line to my script helped me further:
-alwaysPull Y
0 -
Hi again
Just copying the powershell-script supplied from RemkoD at the top with
-imageName "microsoft/dynamics-nav:2018-cu2-dk" `
is working, but I'm not able to log on to neither c/side or windows or web-client??
I would like to use windows-authentication, so I changed the script to:$secureVMAdminPassword = ConvertTo-SecureSTring 'randompass' -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ('someusername', $secureVMAdminPassword)
$licensfilename = "C:\NAV Docker Setup\2018-DK\Udvikler NAV 2018 inkl ISV_011217.flf"
New-NavContainer `
-containerName "container" `
-imageName "microsoft/dynamics-nav:2018-cu2-dk" `
-accept_eula `
//-Credential $credential `
-licenseFile licensfilename`
-auth Windows `
-memoryLimit 3G `
-updateHost `
-useSSL `
-includeCSide `
-doNotExportObjectsToText
But again: Getting this error:Get-Item : Cannot find path '\\-Credential\setup.exe' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.2.6.5\ContainerHandling\New-NavContainer.ps1:170 char:24
+ ... vversion = (Get-Item -Path (Join-Path $navDvdPath "setup.exe")).Versi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (\\-Credential\setup.exe:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
0 -
Unless you're KFrellsen someone else has the same issue with connecting to the (web)client with the same 2018-cu2-dk image
. https://github.com/Microsoft/navcontainerhelper/issues/93
Also check https://blogs.msdn.microsoft.com/freddyk/2017/10/29/troubleshooting-nav-on-docker/
I would recommend to get NavUserPassword to work before going for the Windows Authentication0 -
I've got som help from Freddie on:
https://github.com/Microsoft/nav-docker/issues/167
This solved my problem:-)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions