Saturday, August 15, 2020

Updating from NavContainerHelper to the new BcContainerHelper

 By Steve Endow

UPDATE: If you're interested in a convenient way to run the BcContainerHelper PowerShell commands, check out Krzysztof's Azure Data Studio Notebook with sample BcContainerHelper commands.  Jupyter Notebooks are a great way to include documentation and commands in a single convenient format.

On August 11, 2020, Freddy Kristiansen announced that he had released BcContainerHelper.

You can read his blog post here:

You will definitely want to read the entire blog post carefully, and perhaps read it a few times, as he shares quite a few important details about the new BcContainerHelper.

Same Great Container Helper, But Updated and Upgraded!

I made a video showing how I updated from NavContainerHelper to BcContainerHelper.  The process went flawlessly.

Here are the PowerShell Docker commands that I used to perform my update.

 Update to BcContainerHelper  
 List all containers  
      docker ps -a --format "table {{.Names}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Status}}"  
 Stop all containers  
      docker stop $(docker ps -aq)  
 Remove all containers (optional)  
      Remove-BCContainer <containername>  
 Remove unused images (optional)  
      Try to preserve generic OS image  
      #Review list of images other than generic image  
      docker images | Select-String -pattern "generic" -notMatch  
   #Remove all images except generic image  
      docker images --format "{{.Repository}}\t{{.Tag}}\t{{.ID}}" |   
      Select-String "generic" -notMatch |  
      ConvertFrom-CSV -Delimiter "`t" -Header ("Repository","Tag","ID") |  
      Sort-Object Tag | % ID | % { docker rmi $_ }  
 Uninstall NavContainerHelper  
      Uninstall-Module NavContainerHelper -allversions  
 Install BcContainerHelper  
      #Update PowerShellGet  
      Install-Module -Name PowerShellGet -Repository PSGallery  
      Install-Module BcContainerHelper  
      #Optionally install Pre-release version  
      Install-Module BcContainerHelper -allowPrerelease  
 Config File (optional)  
           "hostHelperFolder": "d:\\containerhelper",  
           "containerHelperFolder": "c:\\programdata\\bccontainerhelper"  

Steve Endow is a Microsoft MVP in Los Angeles.  He works with Dynamics 365 Business Central, Microsoft Power Automate, Power Apps, Azure, .NET, Dynamics GP, and SQL Server.

You can also find him on Twitter and YouTube

No comments:

Post a Comment

All comments must be reviewed and approved before being published. Your comment will not appear immediately.

How many digits can a Business Central Amount field actually support?

 by Steve Endow (If anyone has a technical explanation for the discrepancy between the Docs and the BC behavior, let me know!) On Sunday nig...