Add --backend-args

Allow to add arguments to the backend build arguments

Fixes #146
This commit is contained in:
Ettore Di Giacinto
2021-02-22 13:48:26 +01:00
parent 57e19c61e7
commit 749a4cb615
6 changed files with 29 additions and 19 deletions

View File

@@ -74,3 +74,13 @@ func runCommand(cmd *exec.Cmd) error {
return nil
}
func genBuildCommand(opts compiler.CompilerBackendOptions) []string {
context := opts.Context
if context == "" {
context = "."
}
buildarg := append(opts.BackendArgs, "-f", opts.DockerFileName, "-t", opts.ImageName, context)
return append([]string{"build"}, buildarg...)
}