Bicep Container Image
While using the Azure CLI container image for one of my side projects, I started looking for an image that contains Bicep CLI as well. I found Mikolaj Mackowiak’s Bicep-cli image. This was what I really needed and it includes both Azure CLI and Bicep CLI. However, just as a fun side project, I wanted to publish my own image as well.
I started with Alpine base image and started building everything needed for Azure CLI and Bicep CLI. However, as I started building all dependencies, the size of this image grew from 5MB to ~1GB. This is when I switched the base layer to Microsoft’s Azure CLI image and just added Bicep as a layer.
Here is how my Dockerfile looks now.
|
|
Update (05/21) - Optimized the Dockerfile to reduce number of image layers.
This is available in my Bicephelpers GitHub repository and I have a GitHub action that builds this image and pushes to Docker Hub.
You can pull this image using the following command line.
|
|
I will continue to update this whenever Azure CLI or Bicep CLI get updated.
Comments
Comments Require Consent
The comment system (Giscus) uses GitHub and may set authentication cookies. Enable comments to join the discussion.