This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 520
Pass build arguments into docker build step when using a yaml file #511
Milestone
Comments
Yeah, today passing in @davidfowl for |
Ok. Is there any work around for now? Can I call docker build for example for now? |
I thought we had support for arguments being passed to build but there isn't we'll need to add it. |
I'm going to work on some code for this issue. Will raise a PR and appreciate any feedback. |
ossentoo
pushed a commit
to ossentoo/tye
that referenced
this issue
May 31, 2020
ossentoo
pushed a commit
to ossentoo/tye
that referenced
this issue
May 31, 2020
jkotalik
pushed a commit
to ossentoo/tye
that referenced
this issue
Jun 18, 2020
jkotalik
added a commit
that referenced
this issue
Jun 18, 2020
* Added support for docker build arguments * fixed whitespace issue? #511 * Additional tests * Update src/Microsoft.Tye.Core/ApplicationFactory.cs Co-authored-by: Justin Kotalik <jukotali@microsoft.com> * Update src/Microsoft.Tye.Core/Serialization/ConfigServiceParser.cs Co-authored-by: Justin Kotalik <jukotali@microsoft.com> * Update test/E2ETest/TyeBuildTests.Dockerfile.cs Co-authored-by: Justin Kotalik <jukotali@microsoft.com> * Moved below DockerFile to keep ordering consistent. * refactored HandleServiceDockerArgsNameMapping * Use a stringbuilder for concatenation * Removed appsettings development file * Removed launchSettings file * duplicate parameters test * Multiple build args test * small nits Co-authored-by: Oscar Yahoo <ossent@yahoo.co.uk> Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
My application pulls private nuget packages from an Azure DevOps feed in the docker image build. We normally accomplish this in our Azure DevOps pipeline by passing a build argument to docker build.
I've setup a yaml file to run locally at the moment. This is failing during the dotnet restore step in the Dockerfile as expected, because it needs the credential to the private nuget feed.
Is there a way of passing this in? I'm running locally so, I don't mine passing the PAT in somehow.
I've tried this:
name: application
services:
dockerFile: ../application-web/src/Dockerfile --build-arg PAT=***
I get this output when running tye run with a tye.yaml file in the same directory:
[06:44:57 INF] Building docker image web from docker file
[06:44:57 INF] [web]:unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/blah/application-web/src/Dockerfile --build-arg PAT=***: no such file or directory
The text was updated successfully, but these errors were encountered: