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

Allow setting build args during porter build #1124

Closed
carolynvs opened this issue Jul 7, 2020 · 7 comments
Closed

Allow setting build args during porter build #1124

carolynvs opened this issue Jul 7, 2020 · 7 comments
Assignees
Labels
2 - 🍕 Pizza should be eaten daily enhancement New code incoming!

Comments

@carolynvs
Copy link
Member

carolynvs commented Jul 7, 2020

Sometimes a bundle needs to configure something during build, for example use a corporate proxy while building the bundle, but it doesn't want those values hard coded into the image because it will be used in many environments.

porter build --arg PROXY=https://example.com/proxy

Then the author can use the argument passed (see below). It is up to the author to define and use the arg in the Dockerfile, this feature should not edit the Dockerfile.

FROM debian

ARG PROXY
# use the proxy when building the invocation image

Related #927

@carolynvs carolynvs added gap We missed a spot 1 - 🍫 Eat chocolate _after_ emergency donuts labels Jul 7, 2020
@carolynvs carolynvs added this to the 1.0 milestone Jul 7, 2020
@adelowo
Copy link
Member

adelowo commented Jul 9, 2020

If no one is working on this, I'd take a crack at it

@carolynvs
Copy link
Member Author

Perfect! All yours, let us know if you have any questions.

@carolynvs
Copy link
Member Author

Here's where we set the build args for docker during the porter build command

https://github.com/deislabs/porter/blob/e644d0093b88a73b1ecb5b36012f071b0b24ace9/pkg/build/provider/docker.go#L44-L46

@adelowo
Copy link
Member

adelowo commented Jul 14, 2020

Thanks @carolynvs !!

@vdice vdice removed this from Inbox in Porter and Mixins [OLD] Sep 16, 2020
@carolynvs carolynvs removed this from the 1.0 milestone May 10, 2021
@carolynvs carolynvs added 2 - 🍕 Pizza should be eaten daily enhancement New code incoming! and removed 1 - 🍫 Eat chocolate _after_ emergency donuts gap We missed a spot labels May 10, 2021
@LvffY
Copy link

LvffY commented Mar 11, 2022

@carolynvs Do you have any plan to add this feature ?

@carolynvs
Copy link
Member Author

We have an open pull request that adds support for this #1900. In addition #1769 is on the backlog for our v1 release.

@carolynvs
Copy link
Member Author

Closed in #1769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - 🍕 Pizza should be eaten daily enhancement New code incoming!
Projects
None yet
Development

No branches or pull requests

3 participants