Add support for build-args with --build local (#1256)

At the moment build-args can be specified in the compose configuration,
but they're used only when creating a build-config and not for local
builds.
This commit is contained in:
Christian Fetzer
2020-03-12 22:16:36 +08:00
committed by GitHub
parent d105a77e07
commit ca75c31df8
2 changed files with 15 additions and 2 deletions
+2 -1
View File
@@ -38,7 +38,7 @@ BuildImage builds a Docker image via the Docker API. Takes the source directory
and image name and then builds the appropriate image. Tarball is utilized
in order to make building easier.
*/
func (c *Build) BuildImage(source string, image string, dockerfile string) error {
func (c *Build) BuildImage(source string, image string, dockerfile string, buildargs []dockerlib.BuildArg) error {
log.Infof("Building image '%s' from directory '%s'", image, path.Base(source))
@@ -68,6 +68,7 @@ func (c *Build) BuildImage(source string, image string, dockerfile string) error
InputStream: tarballSource,
OutputStream: outputBuffer,
Dockerfile: dockerfile,
BuildArgs: buildargs,
}
// Build it!