Last Directions US and EMEA, I had the opportunity to talk about – uhm – myself. Well, not really – about my tools. It was a weird experience – but it got more attention than I ever expected.
Now, during... (Continue reading)

Admitted – this is not a lot of new content since my last post – but there are updates since the last one. Also, I wanted to put all repos in a nice clear list.
Since my last post, I was contacted by... (Continue reading)

While I was writing my previous blogpost , I was wondering what the actual Docker repos are today. Basically:
when we want to set up a certain Docker container, where can I find it?
Well, easy. Just... (Continue reading)

A while ago, I blogged about how you can get to all the tags on Docker Hub, for all images of Microsoft Dynamics NAV. This was more useful than I ever imagined, as many people referred to it, or I had... (Continue reading)

Let’s start this year with something completely different. But before we dive in – I’d like to wish you all love, happiness, perfect health and all you want me to wish for you … for 2019 ! Let’s turn... (Continue reading)

Remove all custom apps on Docker container (with PowerShell)

Today, I was prepping for my 2-day Masterclass about developing Extensions in Visual Studio Code. And finally, I made some time to make a first version of a function that I have been wanting for quite some time: a function to remove all the custom apps from a docker image.

What is the challenge?

Well, if you’re used to Extensions V1 – then you’ll notice things have changed on many levels :-). Let’s just say that it’s darn difficult to loose your data. And in my case here – I want to do exactly that. I want to completely clean my custom apps from the Docker container, including data.

By default, when you uninstall or unpublish the app, the data will not be removed. It will simply stay there in the companion tables or dedicated tables for the App – waiting for you to reinstall the app, or upgrade the app.

Why would I want to remove the data?

Well, just imagine development scenarios, where you are working on multiple apps (dependent or not) on one system, and you want to start from scratch again.

Or – in my case – when preparing for demos, and you want to – again – start from a clean sheet.

Or …

OK, show me how!

Well, as said, finally I made some time to put it into a function. And for your convenience, I already put it on my github, you can find it here.

And you see it’s simple. It assumes you’re already using the navcontainerhelper – which you should use when using NAV on Docker (in my opinion). More info on Freddy’s blog.

It is going to search for all apps which are not Microsoft’s apps, loop them, and uninstall, clean and unpublish all these apps one-by-one.. .

You can simply call this function like:

Clean-CustomNAVAppsOnDocker -ContainerName navserver

Are there other ways?

Well, you could obviously just ignore this entire blogpost, and simple replace the docker container by re-installing it. But in this case, you might lose data that you might depend on, or settings, or accessibility, or … .

If Docker still looks a little bit like this to you:

You might just want to reconsider re-installing the container, and just go for the function I talked about ;-).