Skip to content
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] allow azd (via azure.yaml) to add —target to docker build #3050

Closed
splusq opened this issue Dec 2, 2023 · 3 comments · Fixed by #3052
Closed

[Issue] allow azd (via azure.yaml) to add —target to docker build #3050

splusq opened this issue Dec 2, 2023 · 3 comments · Fixed by #3052

Comments

@splusq
Copy link

splusq commented Dec 2, 2023

Describe the bug
Currently azure.yaml does not provide a mechanism to add a --target parameter to docker build. This is necessary for multi-stage docker build where there are multiple layers and at build time one decides which layer to target.

To Reproduce
Run azd package on a multi-stage docker file there are no options to pass the --target argument.

Expected behavior
If one were to build the docker file here's how one would pass the argument:

docker build --target foo -t docker.io/bar/baz -f foo/dockerfile .

Environment
Does not matter.

@rajeshkamal5050
Copy link

Does this already existing feature #2266 help achieve that? cc @vhvb1989 @wbreza

@Petermarcu
Copy link
Member

--target is a different argument than what goes in buildargs.

I started a PR here that might be enough to unblock. I don't think its complete but could be a starting point.
#3052

@Petermarcu
Copy link
Member

@splusq confirmed a build with my change worked for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants