microsoft / nav-docker

Official Microsoft repository for Dynamics NAV in Docker resources. It has not been decided yet, to which extend Microsoft will ship Docker images with NAV, so everything in this repo is work in progress and might be subject to deletion.
MIT License
180 stars 92 forks source link

New-Navcontainer and 'auth Windows' #167

Closed jensthomsenEV closed 6 years ago

jensthomsenEV commented 6 years ago

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

By adding this line (thanks to RemKoD for replying on: )

-alwaysPull Y I get a little further but the script still terminated with an error:-(

freddydk commented 6 years ago

enableSymbolLoading is a Switch - you should not put Y after that. the Y is by PowerShell interpreted as another parameter. the same with -alwaysPull - either you do it, or you don't.

jensthomsenEV commented 6 years ago

GREAT! This did the work:-) My script now looks like this:

New-NavContainer `
  -containerName "Nav2018CU2" `
  -imageName "microsoft/dynamics-nav:2018-cu2-dk" `
  -accept_eula `
  -auth Windows `
  -memoryLimit 3G `
  -licenseFile "C:\NAV Docker Setup\2018-DK\Udvikler NAV 2018 inkl ISV_011217.flf"`
  -IncludeCSide `
  -updateHost `
  -useSSL `
  -doNotExportObjectsToText `
  -enableSymbolLoading `
  -alwaysPull 

I'm able to run all the clients via windows authentication (great!), but in the web-client I get a certifcate error - the client is running but is showing an error (I would like to show the error but am not able to paste a picture in here:-(). Is there a way to get around this?

jensthomsenEV commented 6 years ago

A request: Could it be possible with a switch like 'EnableVisualStudioCode' that pre-configures a new project to make it easy start coding in VS code?

freddydk commented 6 years ago

You should not reopen something completely different to post a request. Having said that, what you are asking for is Ctrl+Shift P : AL Go! in VS Code to give you a start project. No plans to add further in the Azure VM's or containerhelper right now.

jensthomsenEV commented 6 years ago

ok

mplze commented 5 years ago

While creating NAV 2018 Docker conterner im getting below error message

$imageName = "microsoft/dynamics-nav:2018" $containerName = "Name2018" $auth = "Windows" $licenseFile = "D:\NAVLicence\ScandiSysLic.flf" $shortcuts = "Desktop"

New-NavContainer -accept_eula -imageName $imageName -containerName $containerName -auth $auth
-licenseFile $licenseFile -updateHosts -accept_outdated -doNotCheckHealth
-shortcuts $shortcuts

Error Message

Starting Container Hostname is Name2018 PublicDnsName is Name2018 You are trying to run a container which is more than 90 days old. Microsoft recommends that you always run the latest version of our containers. Set the environment variable ACCEPT_OUTDATED to 'Y' if you want to run this container anyway. at , C:\Run\navstart.ps1: line 54 at , C:\Run\start.ps1: line 121 at , : line 1 Initialization of container Name2018 failed At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.4.1\ContainerHandling\Wait-NavContainerReady.ps1:44 char:17

failed" ...

Docker 2018

freddydk commented 5 years ago

Please don't hijack closed issues - create a new issue instead. Having said that, I assume the reason is, that you somehow have split the line and the -accept_outdated somehow is not seen as part of the new-navcontainer.