title | description | ms.topic | ms.date |
---|---|---|---|
Use a container registry from Visual Studio Code |
Tutorial part 2, use a container registry |
conceptual |
09/20/2019 |
Previous step: Introduction and prerequisites
In this step, you set up a suitable container registry for your app image. Container-capable hosting services like Azure App Service can then pull images from the registry.
This tutorial uses Azure Container Registry, a private, secure, hosted registry for your images. However, the tools and processes shown here also work with other registries like Docker Hub.
-
In Visual Studio Code, select F1 to open the command palette.
-
Enter registry in the search box. From the results, select Azure Container Registry: Create Registry.
-
Enter or select the following values:
- In Registry name, enter a name that is unique in Azure and contains from 5 to 50 alphanumeric characters.
- In SKU, select Basic.
- In Resource group, enter a value that is unique within your subscription.
- In Location, select a region close to you.
Visual Studio Code begins the process of creating the registry in Azure. After it finishes, you'll see a notification like the following one. This notification confirms the registry was successfully created.
-
Open the Docker explorer. Ensure that the registry endpoint you just set up is visible under Registries.
While you can see your Azure registries in the Docker extension, you can't push images to them until you sign in to Container Registry.
-
In Visual Studio, select Ctrl+` to open the integrated terminal.
-
Run the following Azure CLI command to sign in to Container Registry. Replace
<your-registry-name>
with the name of the registry you created.az acr login --name <your-registry-name>
[!div class="nextstepaction"] I created a registry I ran into a problem