Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
It can be very handy to know which NAV Docker images are available on Microsoft’s public Docker repository, you can either do this the boring way by browsing this website (it will only show the 100? most recent tags) or the cool way by using (obviously) PowerShell.
For the latter we need to use the Docker Registry HTTP API, I thought this would be very simple since the registry is publicly accessible, but guess what?
That’s not really the case through the API…
To make your life a little easier, I’ve created two PowerShell functions and two simple helper functions to forget about this hassle.
Let’s start with the helper functions!
No need to show the code for this one, it just returns the static docker repository name (microsoft/dynamics-nav)
This function will authenticate against the Docker registry and ask for permissions to pull from this repository, in the response we will get an access token which we can use in the other API calls.
And now the actual functions…
This function will authenticate against the Docker registry by using the Get-AuthorizationHeader helper function and retrieve an array of all the available Docker image tags.
Those tags are not the fully qualified image names so I add the repository name in front of it (microsoft/dynamics-nav) so they can be directly used for pulling a certain image.
This function will take an image name from the pipeline, call the Get-NavDockerImage function to retrieve all the available images and then check if the provided image name exists.
If so, it will return true, otherwise false, just like any other PowerShell function containing the ‘Test’ verb.
I’ve wrapped these four functions in a simple module you can get from my GitHub, I might also make a pull request on the NavContainerHelper to include those because that’s the place where they belong.
Business Applications communities