New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] Support passing build-arg
to docker builds
#1270
Comments
Great idea! Thanks for the request. |
* feat: adding postgresql to devcontainer for the blog backend * feat: adding strapi from a base template Updated gitignore to allow the .env.example file. Using a dedicated gitignore in the cms folder for Strapi-specific stuff * fix: fixing devcontainer * feat: nextjs blog from sample * feat: starting work on the azd integration * feat: adding postgresql for the cms db * fix: eslint issues * chore: package-lock updates * chore: cleanup for package-lock from bringing new projects in * fix: env var in the postgres compose setup * fix: generating the default db as blog not postgres * fix: missing ignore for the strapi build cache * fix: scripts for swa emulator to run blog * chore: debugging launch for blog * chore: removing blog from swa cli * fix: removing the linked backends as nextjs hybrid doesn't use that, API backends are disabled * feat: moving blog from swa to container apps * fix: moving away from SSG aspects due to Azure/azure-dev#1270 * fix: parameters for blog deployment * fix: setting the module path for the azd things to deploy * fix: removing package-lock from dockerfile as it doesn't exist due to workspaces * fix: improving the outputs and naming of services to be more predictable * fix: name of container apps service is lifted up to variable This makes it easier to pass in as an argument using a params file * fix: the params and individual service deployment of the CMS * fix: individual service deployment of the blog frontend * chore: remove website package Website has been moved to a dedicated repo, this is cleanup of it * chore: removing old SWA deployment action * feat: adding azure storage strapi provider * fix: refactoring the bicep files for deployment - Changing `blog-cms` to just `cms` due to Azure/azure-dev#1290 - Adding more parameters to the cms deployment file that are the secrets - moving serviceName tokenisation to the container-apps file rather than main, to make it consistent - Fixing the service name for the portal * fix: storage account path needs to be added to nextjs for next/image to work * fix: variables not set properly for CMS setup * fix: version of strapi azure storage plugin set * fix: Missing flag in the env sample file * fix: moving from domains to routePatterns for next/image This means we don't need to know the storage account domain name, making the deployment more flexible * chore: addressing package-lock after merge * chore: adding readme guide for setting up blog * fix: simplifying the password to avoid problems with yaml encoding * chore: added section to readme for non-devcontainer usage * fix: adding max retries to getting cosmos cert * fix: forgot to update the database password on the service * chore: fixing some package versions * fix: incrementing vars in bash * chore: improving the docs for devcontainer usage Setting host requirements for the devcontainer * chore: line endings are fun * chore: reverting gitattributes to see if that fixes line endings * fix: forcing ts/tsx to be lf line endings to avoid problems with linting on Windows * chore(cms): update local dev guide Co-authored-by: Wassim Chegham <github@wassim.dev>
* feat: adding postgresql to devcontainer for the blog backend * feat: adding strapi from a base template Updated gitignore to allow the .env.example file. Using a dedicated gitignore in the cms folder for Strapi-specific stuff * fix: fixing devcontainer * feat: nextjs blog from sample * feat: starting work on the azd integration * feat: adding postgresql for the cms db * fix: eslint issues * chore: package-lock updates * chore: cleanup for package-lock from bringing new projects in * fix: env var in the postgres compose setup * fix: generating the default db as blog not postgres * fix: missing ignore for the strapi build cache * fix: scripts for swa emulator to run blog * chore: debugging launch for blog * chore: removing blog from swa cli * fix: removing the linked backends as nextjs hybrid doesn't use that, API backends are disabled * feat: moving blog from swa to container apps * fix: moving away from SSG aspects due to Azure/azure-dev#1270 * fix: parameters for blog deployment * fix: setting the module path for the azd things to deploy * fix: removing package-lock from dockerfile as it doesn't exist due to workspaces * fix: improving the outputs and naming of services to be more predictable * fix: name of container apps service is lifted up to variable This makes it easier to pass in as an argument using a params file * fix: the params and individual service deployment of the CMS * fix: individual service deployment of the blog frontend * chore: remove website package Website has been moved to a dedicated repo, this is cleanup of it * chore: removing old SWA deployment action * feat: adding azure storage strapi provider * fix: refactoring the bicep files for deployment - Changing `blog-cms` to just `cms` due to Azure/azure-dev#1290 - Adding more parameters to the cms deployment file that are the secrets - moving serviceName tokenisation to the container-apps file rather than main, to make it consistent - Fixing the service name for the portal * fix: storage account path needs to be added to nextjs for next/image to work * fix: variables not set properly for CMS setup * fix: version of strapi azure storage plugin set * fix: Missing flag in the env sample file * fix: moving from domains to routePatterns for next/image This means we don't need to know the storage account domain name, making the deployment more flexible * chore: addressing package-lock after merge * chore: adding readme guide for setting up blog * fix: simplifying the password to avoid problems with yaml encoding * chore: added section to readme for non-devcontainer usage * fix: adding max retries to getting cosmos cert * fix: forgot to update the database password on the service * chore: fixing some package versions * fix: incrementing vars in bash * chore: improving the docs for devcontainer usage Setting host requirements for the devcontainer * chore: line endings are fun * chore: reverting gitattributes to see if that fixes line endings * fix: forcing ts/tsx to be lf line endings to avoid problems with linting on Windows * chore(cms): update local dev guide Co-authored-by: Wassim Chegham <github@wassim.dev>
* feat: adding postgresql to devcontainer for the blog backend * feat: adding strapi from a base template Updated gitignore to allow the .env.example file. Using a dedicated gitignore in the cms folder for Strapi-specific stuff * fix: fixing devcontainer * feat: nextjs blog from sample * feat: starting work on the azd integration * feat: adding postgresql for the cms db * fix: eslint issues * chore: package-lock updates * chore: cleanup for package-lock from bringing new projects in * fix: env var in the postgres compose setup * fix: generating the default db as blog not postgres * fix: missing ignore for the strapi build cache * fix: scripts for swa emulator to run blog * chore: debugging launch for blog * chore: removing blog from swa cli * fix: removing the linked backends as nextjs hybrid doesn't use that, API backends are disabled * feat: moving blog from swa to container apps * fix: moving away from SSG aspects due to Azure/azure-dev#1270 * fix: parameters for blog deployment * fix: setting the module path for the azd things to deploy * fix: removing package-lock from dockerfile as it doesn't exist due to workspaces * fix: improving the outputs and naming of services to be more predictable * fix: name of container apps service is lifted up to variable This makes it easier to pass in as an argument using a params file * fix: the params and individual service deployment of the CMS * fix: individual service deployment of the blog frontend * chore: remove website package Website has been moved to a dedicated repo, this is cleanup of it * chore: removing old SWA deployment action * feat: adding azure storage strapi provider * fix: refactoring the bicep files for deployment - Changing `blog-cms` to just `cms` due to Azure/azure-dev#1290 - Adding more parameters to the cms deployment file that are the secrets - moving serviceName tokenisation to the container-apps file rather than main, to make it consistent - Fixing the service name for the portal * fix: storage account path needs to be added to nextjs for next/image to work * fix: variables not set properly for CMS setup * fix: version of strapi azure storage plugin set * fix: Missing flag in the env sample file * fix: moving from domains to routePatterns for next/image This means we don't need to know the storage account domain name, making the deployment more flexible * chore: addressing package-lock after merge * chore: adding readme guide for setting up blog * fix: simplifying the password to avoid problems with yaml encoding * chore: added section to readme for non-devcontainer usage * fix: adding max retries to getting cosmos cert * fix: forgot to update the database password on the service * chore: fixing some package versions * fix: incrementing vars in bash * chore: improving the docs for devcontainer usage Setting host requirements for the devcontainer * chore: line endings are fun * chore: reverting gitattributes to see if that fixes line endings * fix: forcing ts/tsx to be lf line endings to avoid problems with linting on Windows * chore(cms): update local dev guide Co-authored-by: Wassim Chegham <github@wassim.dev>
* feat: adding postgresql to devcontainer for the blog backend * feat: adding strapi from a base template Updated gitignore to allow the .env.example file. Using a dedicated gitignore in the cms folder for Strapi-specific stuff * fix: fixing devcontainer * feat: nextjs blog from sample * feat: starting work on the azd integration * feat: adding postgresql for the cms db * fix: eslint issues * chore: package-lock updates * chore: cleanup for package-lock from bringing new projects in * fix: env var in the postgres compose setup * fix: generating the default db as blog not postgres * fix: missing ignore for the strapi build cache * fix: scripts for swa emulator to run blog * chore: debugging launch for blog * chore: removing blog from swa cli * fix: removing the linked backends as nextjs hybrid doesn't use that, API backends are disabled * feat: moving blog from swa to container apps * fix: moving away from SSG aspects due to Azure/azure-dev#1270 * fix: parameters for blog deployment * fix: setting the module path for the azd things to deploy * fix: removing package-lock from dockerfile as it doesn't exist due to workspaces * fix: improving the outputs and naming of services to be more predictable * fix: name of container apps service is lifted up to variable This makes it easier to pass in as an argument using a params file * fix: the params and individual service deployment of the CMS * fix: individual service deployment of the blog frontend * chore: remove website package Website has been moved to a dedicated repo, this is cleanup of it * chore: removing old SWA deployment action * feat: adding azure storage strapi provider * fix: refactoring the bicep files for deployment - Changing `blog-cms` to just `cms` due to Azure/azure-dev#1290 - Adding more parameters to the cms deployment file that are the secrets - moving serviceName tokenisation to the container-apps file rather than main, to make it consistent - Fixing the service name for the portal * fix: storage account path needs to be added to nextjs for next/image to work * fix: variables not set properly for CMS setup * fix: version of strapi azure storage plugin set * fix: Missing flag in the env sample file * fix: moving from domains to routePatterns for next/image This means we don't need to know the storage account domain name, making the deployment more flexible * chore: addressing package-lock after merge * chore: adding readme guide for setting up blog * fix: simplifying the password to avoid problems with yaml encoding * chore: added section to readme for non-devcontainer usage * fix: adding max retries to getting cosmos cert * fix: forgot to update the database password on the service * chore: fixing some package versions * fix: incrementing vars in bash * chore: improving the docs for devcontainer usage Setting host requirements for the devcontainer * chore: line endings are fun * chore: reverting gitattributes to see if that fixes line endings * fix: forcing ts/tsx to be lf line endings to avoid problems with linting on Windows * chore(cms): update local dev guide Co-authored-by: Wassim Chegham <github@wassim.dev>
Adding support for passing `buildArgs` to docker via the azure.yaml file
We should consider how this plays well with #1810 Also, do we expect |
Sure. I'll have a read of #1810 and add thoughts.
I think we should support substitution of environment variables, both from a system level and from the azd output. I described a particular scenario in #121 (comment) in which I wanted to take the output from one service and use it in another via |
Is this now complete via #2266 ? |
* feat: adding postgresql to devcontainer for the blog backend * feat: adding strapi from a base template Updated gitignore to allow the .env.example file. Using a dedicated gitignore in the cms folder for Strapi-specific stuff * fix: fixing devcontainer * feat: nextjs blog from sample * feat: starting work on the azd integration * feat: adding postgresql for the cms db * fix: eslint issues * chore: package-lock updates * chore: cleanup for package-lock from bringing new projects in * fix: env var in the postgres compose setup * fix: generating the default db as blog not postgres * fix: missing ignore for the strapi build cache * fix: scripts for swa emulator to run blog * chore: debugging launch for blog * chore: removing blog from swa cli * fix: removing the linked backends as nextjs hybrid doesn't use that, API backends are disabled * feat: moving blog from swa to container apps * fix: moving away from SSG aspects due to Azure/azure-dev#1270 * fix: parameters for blog deployment * fix: setting the module path for the azd things to deploy * fix: removing package-lock from dockerfile as it doesn't exist due to workspaces * fix: improving the outputs and naming of services to be more predictable * fix: name of container apps service is lifted up to variable This makes it easier to pass in as an argument using a params file * fix: the params and individual service deployment of the CMS * fix: individual service deployment of the blog frontend * chore: remove website package Website has been moved to a dedicated repo, this is cleanup of it * chore: removing old SWA deployment action * feat: adding azure storage strapi provider * fix: refactoring the bicep files for deployment - Changing `blog-cms` to just `cms` due to Azure/azure-dev#1290 - Adding more parameters to the cms deployment file that are the secrets - moving serviceName tokenisation to the container-apps file rather than main, to make it consistent - Fixing the service name for the portal * fix: storage account path needs to be added to nextjs for next/image to work * fix: variables not set properly for CMS setup * fix: version of strapi azure storage plugin set * fix: Missing flag in the env sample file * fix: moving from domains to routePatterns for next/image This means we don't need to know the storage account domain name, making the deployment more flexible * chore: addressing package-lock after merge * chore: adding readme guide for setting up blog * fix: simplifying the password to avoid problems with yaml encoding * chore: added section to readme for non-devcontainer usage * fix: adding max retries to getting cosmos cert * fix: forgot to update the database password on the service * chore: fixing some package versions * fix: incrementing vars in bash * chore: improving the docs for devcontainer usage Setting host requirements for the devcontainer * chore: line endings are fun * chore: reverting gitattributes to see if that fixes line endings * fix: forcing ts/tsx to be lf line endings to avoid problems with linting on Windows * chore(cms): update local dev guide Co-authored-by: Wassim Chegham <github@wassim.dev>
* feat: adding postgresql to devcontainer for the blog backend * feat: adding strapi from a base template Updated gitignore to allow the .env.example file. Using a dedicated gitignore in the cms folder for Strapi-specific stuff * fix: fixing devcontainer * feat: nextjs blog from sample * feat: starting work on the azd integration * feat: adding postgresql for the cms db * fix: eslint issues * chore: package-lock updates * chore: cleanup for package-lock from bringing new projects in * fix: env var in the postgres compose setup * fix: generating the default db as blog not postgres * fix: missing ignore for the strapi build cache * fix: scripts for swa emulator to run blog * chore: debugging launch for blog * chore: removing blog from swa cli * fix: removing the linked backends as nextjs hybrid doesn't use that, API backends are disabled * feat: moving blog from swa to container apps * fix: moving away from SSG aspects due to Azure/azure-dev#1270 * fix: parameters for blog deployment * fix: setting the module path for the azd things to deploy * fix: removing package-lock from dockerfile as it doesn't exist due to workspaces * fix: improving the outputs and naming of services to be more predictable * fix: name of container apps service is lifted up to variable This makes it easier to pass in as an argument using a params file * fix: the params and individual service deployment of the CMS * fix: individual service deployment of the blog frontend * chore: remove website package Website has been moved to a dedicated repo, this is cleanup of it * chore: removing old SWA deployment action * feat: adding azure storage strapi provider * fix: refactoring the bicep files for deployment - Changing `blog-cms` to just `cms` due to Azure/azure-dev#1290 - Adding more parameters to the cms deployment file that are the secrets - moving serviceName tokenisation to the container-apps file rather than main, to make it consistent - Fixing the service name for the portal * fix: storage account path needs to be added to nextjs for next/image to work * fix: variables not set properly for CMS setup * fix: version of strapi azure storage plugin set * fix: Missing flag in the env sample file * fix: moving from domains to routePatterns for next/image This means we don't need to know the storage account domain name, making the deployment more flexible * chore: addressing package-lock after merge * chore: adding readme guide for setting up blog * fix: simplifying the password to avoid problems with yaml encoding * chore: added section to readme for non-devcontainer usage * fix: adding max retries to getting cosmos cert * fix: forgot to update the database password on the service * chore: fixing some package versions * fix: incrementing vars in bash * chore: improving the docs for devcontainer usage Setting host requirements for the devcontainer * chore: line endings are fun * chore: reverting gitattributes to see if that fixes line endings * fix: forcing ts/tsx to be lf line endings to avoid problems with linting on Windows * chore(cms): update local dev guide Co-authored-by: Wassim Chegham <github@wassim.dev>
When deploying apps that are within a container, such as Container Apps, there can be scenarios where you need to provide build-time variables to the Dockerfile. An example of this I described in this issue comment, but there are other reasons you may need an environment variable to trigger different aspects of the container build.
Looking at the Docker
build
function here:azure-dev/cli/azd/pkg/tools/docker/docker.go
Lines 43 to 60 in 037e763
There's no way to provide a
build-arg
flag to thedocker build
command. I suggest we expand thedocker.properties
part theazure.yaml
schema (azure-dev/schemas/v1.0/azure.yaml.json
Lines 110 to 139 in 037e763
build-args
as desired.The text was updated successfully, but these errors were encountered: