I have been wanting to create a repository of scripts, where you could locate the right script for your usage. The problem I ran into was however that the number of scripts in a repository like that would very quickly explode. Yesterday evening while riding my bike, I got an idea…

Why not create a script generator script for Business Central on Docker. A script, which asks you a lot of questions and then generates a script, which you can save and run.

Version 0.0.0.1

Obviously the script isn’t done yet, but there is a very first version of it, and I would really like some feedback. The way it works is, that you start Windows PowerShell (ISE and VSCode also works) and run this script:

Invoke-Expression (New-Object System.Net.WebClient).DownloadString("http://aka.ms/bcdockerscript")

You are of course welcome to download and inspect the script if you like, but the script will be updated in its location regularly. When launching the script you should see:

Type Y and continue. Now you will be lead through a number of questions and for each question, I will try to explain what this means. First question is if you want to run locally or inside an Azure VM.

You will also need to specify which Business Central version you want and which country version you want and in the end, the script will display the script needed to create the container you want, giving you a chance to save it and execute it:

Executing the script should give you a container, with the things you specified in the script:

If you instead select an Azure VM, then you “script” will be a URL, which launches one of the ARM templates with a number of parameters pre-filled with your selectioins.

Try it out!

Try it out and let me know if there are bugs and what you think is missing?

Enjoy

Freddy Kristiansen
Technical Evangelist