-
Notifications
You must be signed in to change notification settings - Fork 229
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
Proposal: support docker build args via "faas-cli build" flags. #325
Comments
Hi Igor, I've read your proposal and compared it to #262 - as far as I can tell it's a duplicate but you specify wanting to use CLI arguments and @itscaro specifies using YAML. If we make this change then it will need to be supported via the CLI and via YAML so I'm going to close your issue and reference it on #262. Please feel free to mention your request for CLI support there or +1 the issue. My concern in passing arbitrary build flags to the OpenFaaS template is the following:
With those concerns in mind we should be careful about injecting run-time parameters into the Docker build. Maybe if we take a step back and analyze the problem that this acts to solve we could consider whether other approaches exist? |
Hmm, from one point of view these are definitely interesting concerns that should be analyzed. But, I think all these decisions were already made when docker implemented build arguments feature. Refs: 1, 2 and others. And, as openfaas uses docker as a container implementation, but tries to abstract it away, maybe can we have a specific group of CLI flags that are related to docker and passed directly to the docker CLI? As an example that comes to mind: Another weird thing to notice is that openfaas CLI already supports docker-specific flags like Just thinking out loud. |
Derek close: duplicate |
@hypnoglow let's continue discussion on the original issue. |
The proposal is to add a possibility to pass build args to an underlying "docker build" process. This is kind of related to #262 but I propose to add command-line flags to "faas-cli build" command.
Expected Behaviour
Define a build arg in Dockerfile.
Run
faas-cli build -f my-func.yaml --args FOO=bar
. The FOO argument is actually passed todocker build
command as--build-arg
flag.Output:
Current Behaviour
Docker build args are not supported.
Context
This can solve issues like this, if we can use build arguments in openfaas templates.
The text was updated successfully, but these errors were encountered: