In my docker image, I currently specify the download of the bicep module from GitHub as suggested in the Azure Documentation.
# Install Bicep
RUN curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
RUN chmod +x ./bicep
RUN mv ./bicep /usr/local/bin/bicep
Now, I want to fix the version of the bicep to be v0.23.1. Do you know how to achieve that? I played around with the link, but I did not manage to get the path. For example, I tried without success:
curl -Lo bicep https://github.com/Azure/bicep/releases/download/v0.23.1/bicep-linux-x64
I suppose I need something more sophisticated than curl -Lo. Can someone give me a hint on how I get specific release assets from git?
Solution:
For reference the above curl statement with version works for the docker file. I had a problem with my ps rule configurations, which I was trying to fix at the same time. For those who might need it, this is how the ps-rule.yml can be configured:
requires:
# Require PSRule for Azure v1.30.1
PSRule: '2.9.0'
PSRule.Rules.Azure: '1.30.1'
Try this
Dockerfile(or adapt it to fit into your existingDockerfile):You also need to install
libicu-devin order to runbicep.Then fire up a container and test: