Open BoBiene opened 1 year ago
@BoBiene Hey Bo, apologies for the delayed response -- we currently don't have a mechanism by which you can pass environment variables or arguments to the docker build
command used when a Dockerfile is provided to or found by this task. We had a similar issue opened in our GitHub Action equivalent repository, so this may be something that we need to prioritize enabling for this scenario.
Would you mind confirming that the issue above is similar to your request and that it occurs when you're providing your own Dockerfile to be built by the task? Thanks in advance!
Hi,
Yes, I can confirm that I use a custom docker file. When using dotnet and the azure devops nuget storage, you need to pass the access token from the build agent inside the docker to access the private nuget feed. This is because the nuget feed requires authentication and the docker container does not have access to the build agent's credentials by default.
@BoBiene Hey Bo, thanks for the reply and providing additional context for your scenario -- we'll take a look at adding support for providing build arguments for the Dockerfile scenario as arguments of the task. We'll keep this issue up to date with any updates we may have. Thanks!
@cormacpayne Thanks for following up with that. That'd massively help as we also need to pass build time arguments to our Dockerfile in our Next.js project. Thanks.
Hi,
how can i provide the FEED_ACCESSTOKEN or any other build-arg to the docker build command?