Categories
Azure DevOps Docker Dynamics NAV Microsoft

docker : error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Solution:
Open PowerShell as Administrator and run the following command

net start docker

Did my solution solve your problem? Leave a reply.

Categories
Docker Dynamics NAV HOW TO Microsoft

HOW TO Synchronize a tenant database schema in a NAV Container

In order to work with NAV containers, I highly recommend using NAVContainerHelper PowerShell module.
In the version 0.5.0.0 a new really powerfull function Invoke-ScriptInNavContainer
has been released, it allows you to invoke a PowerShell ScriptBlock in a NAV container.

Using NAVContainerHelper you do not have to care about loading NAV modules because they are already part of it and loaded, so to return to the title of this post, the script to synchronize database schema is:

$containerName = "scadev"
Invoke-ScriptInNavContainer -containerName $containerName -ScriptBlock {        
    Get-NAVTenant NAV | Sync-NavTenant -Mode Sync -Force 
}

Invoke-ScriptInNavContainer has two mandatory parameters, the name of the container and the script block. In the ScriptBlock, I’m using two standard PowerShell functions included in the NAV module Microsoft.Dynamics.Nav.Management:

  1. Get-NAVTenant to retrieve the tenant
  2. Sync-NavTenant to synchronizes the database schema

Did my HOW TO help you? Leave a reply.