You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work on context where we need multi-context build and overwritten contexts to build our container images.
Some companies have security tools that prevent us from building images or downloading dependencies without a custom certificate, but on CI process, this certificate is not needed so we can't put it on the Dockerfile.
Buildx Bake offer a solution to orchestrate the builds and it can be good to have it on azd CLI
We can imaging having an azure.yaml that look like
name: projectmetadata:
services:
api:
project: ./src/Project.Apilanguage: dotnethost: containerappdocker:
bake:
definition: docker-bake.hcl# change by "api-proj-custom-certificate" if your build depends on custom certificatestarget: api-proj# this property allow to run using docker-bake.hcl in root folder and not on service folder# to not have to change the definition of Bake just for azd CLIuseServiceContext: false
With this kind of solution, in this exemple, someone without the certificate constraint can build the image using docker buildx bake api-proj while someone with the constraint can run docker buildx bake api-proj-custom-certificate without any changes on the Dockerfile
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I work on context where we need multi-context build and overwritten contexts to build our container images.
Some companies have security tools that prevent us from building images or downloading dependencies without a custom certificate, but on CI process, this certificate is not needed so we can't put it on the Dockerfile.
Buildx Bake offer a solution to orchestrate the builds and it can be good to have it on
azd
CLII started to implement it (https://github.com/AlexisMtr/azure-dev/tree/docker-bake-support), but I'm not a Go developer and I haven't a deep understanding on how this project is architecture, I'm not the best to implement I guess
Maybe, it can be useful for #3457 as builx bake allow to build more than one container in a single run.
An exemple is sometimes better 😉
With Dockerfile
And docker-bake.hcl
We can imaging having an azure.yaml that look like
With this kind of solution, in this exemple, someone without the certificate constraint can build the image using
docker buildx bake api-proj
while someone with the constraint can rundocker buildx bake api-proj-custom-certificate
without any changes on the DockerfileBeta Was this translation helpful? Give feedback.
All reactions