Working with Bicep in a Docker container
We have covered many ways in which you can install Azure Bicep and get started. However, sometimes you do not wish to install it locally, or you simply want to leverage a Docker container to work with your Bicep files. In this section, we will cover how to do that.
Working with an Azure CLI Docker container
Fortunately, the Azure CLI has a Docker image that you can pull and use. Run the following commands to get the image and run it locally:
#pull the image docker pull mcr.microsoft.com/azure-cli #run the container docker run -it --rm mcr.microsoft.com/azure-cli #install bicep az bicep install #run the deployment using Azure CLI az deployment group create -f main.bicep -g my-rg
Currently, the Docker image does not have Bicep pre-installed, so you need to install it. But as you saw, the installation is effortless and from here on, you have a full working environment at your disposal. This approach is also a good candidate for your...