Lösungen
Märkte
Referenzen
Services
Unternehmen
Get logs and execute commands on Azure Container Instances

Get logs and execute commands on Azure Container Instances

3. Mai 2018

Get logs and execute commands on Azure Container Instances

Azure Container Instances (ACI) have recently reached GA and adoption and use cases have come up in a lot of places. Two examples of that would be my NAV/BC on ACI quickstart template and the API-enabled NAV instance on ACI you can create from my VS Code extension. Two very nice features have also been added to ACI: The ability to directly get logs from your ACI and execute a command in it

The TL;DR

If you want to get the logs from your ACI do

az container logs --name <containername> --resource-group <groupname>

and if you want to execute a command, e.g. powershell in your ACI do

az container exec --name <containername> --resource-group <groupname> --exec-command powershell

. After that just do whatever you need to do in PowerShell. This gives you the flexibility to change everything you need in your ACI, making it a fully functional environment.

The details

Actually, in this case I don’t have anything to share additionally, so I’ll just end it with a quick sample of restarting your NAV Server instance in your NAV ACI:

Thanks a lot to Anders Liu for sharing this (weeks ago…)!