From 3bb91263e1df3b04d6bece2478343a659503daf5 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 22 Jan 2021 12:00:14 +0100 Subject: [PATCH] feat: set DOCKER_IMAGE_CREATED as build-arg --- plugin/docker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/docker.go b/plugin/docker.go index cb38fb2..b0d5830 100644 --- a/plugin/docker.go +++ b/plugin/docker.go @@ -5,6 +5,7 @@ import ( "os" "os/exec" "strings" + "time" "github.com/urfave/cli/v2" ) @@ -106,6 +107,9 @@ func commandBuild(build Build) *exec.Cmd { args = append(args, "--platform", strings.Join(build.Platforms.Value()[:], ",")) } + // append generated build args + args = append(args, "--build-arg", "DOCKER_IMAGE_CREATED=%s", time.Now().Format(time.RFC3339)) + return exec.Command(dockerExe, args...) }