mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-10 03:30:40 +00:00
feat: set DOCKER_IMAGE_CREATED as build-arg
This commit is contained in:
parent
90f4d344e8
commit
3bb91263e1
@ -5,6 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
@ -106,6 +107,9 @@ func commandBuild(build Build) *exec.Cmd {
|
|||||||
args = append(args, "--platform", strings.Join(build.Platforms.Value()[:], ","))
|
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...)
|
return exec.Command(dockerExe, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user