Creating containers

Containers can be easily created. In this example, the container is created from the CLI, with only a few parameters. To create a container, open the Azure Cloud Shell from the Azure Portal, select the Bash tab, and add the following code:

This step is optional. You can use this if you want to check and change the default selected Azure subscription:

az account showaz account set -s "Your-Subscription-Name"

Next, create the resource group and the container:

az group create --name packtcontainergroup --location "West Europe"az container create -g packtcontainergroup --name packtcontainer --image library/nginx --ip-address public
You can also install CLI 2.0 on your Windows device using the following URL: https://azure.microsoft.com/nl-nl/blog/azure-cli-2-0-new-commands-features-available-now-in-azure-cloud-shell/ ...

Get Architecting Microsoft Azure Solutions - Exam Guide 70-535 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.