Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

Опции темы Поиск в этой теме Опции просмотра
Старый 08.01.2018, 03:49   #1  
Blog bot is offline
Blog bot
21,905 / 759 (69) +++++++
Регистрация: 28.10.2006
waldo: 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 ;-).

Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
waldo: Docker@waldo – Updating my local environment Blog bot NAV: Blogs 0 09.11.2017 21:14
waldo: Docker@waldo – Updating my local environment Blog bot NAV: Blogs 0 09.11.2017 15:11
waldo: Import-NAVModules: An easy way to import NAV PowerShell modules Blog bot NAV: Blogs 0 30.06.2017 03:32
waldo: PowerShellGet & waldo’s PowerShell Modules Blog bot NAV: Blogs 0 17.01.2017 08:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Часовой пояс GMT +3, время: 20:12.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.