title: How to issue a CLI command (or make use of Azure SDK) from an Azure Docker Container at startup
body: <p>I need to issue the following command or accomplish the equivalent from the Azure SDK and C#.</p>
  <pre><code>az network private-dns record-set a update --name &lt;name&gt; -g &lt;resource-group&gt; -z &lt;zone-name&gt; --set aRecords[0].ipv4Address=$(hostname -i)
  </code></pre>
  <p>This I need to do every time the ACI starts up (for whatever reason) so that the Private DNS Zone has the current IP address for the ACI (since private IP can change), which will be running in the same VNet.</p>
  <p>I see several possible solutions, none of which I’m familiar enough to implement.</p>
  <ol>
  <li>YAML file settings.</li>
  <li>Azure SDK c# method call from within the container.</li>
  <li>Shell out from the container to run the command.</li>
  </ol>
  <p>Appreciate any details on how to accomplish one of these solutions.</p>