diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-02 14:25:29 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-02 14:25:29 -0500 |
commit | 5df6251402af9cc38172edb7802374fcf787d920 (patch) | |
tree | 779860725a73f4fbe19a48aadb96070be3b40114 /pkg/bindings | |
parent | 426178a49991106ffe222f12cc42409ae78dd257 (diff) | |
download | podman-5df6251402af9cc38172edb7802374fcf787d920.tar.gz podman-5df6251402af9cc38172edb7802374fcf787d920.tar.bz2 podman-5df6251402af9cc38172edb7802374fcf787d920.zip |
Fix support for podman build --timestamp
Currently podman is ignoreing the build --timestamp flag.
This PR fixes this for local and remote clients.
Fixes: https://github.com/containers/podman/issues/9569
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/images/build.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go index 6e16461e5..27706fd2c 100644 --- a/pkg/bindings/images/build.go +++ b/pkg/bindings/images/build.go @@ -185,6 +185,12 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO if options.Squash { params.Set("squash", "1") } + + if options.Timestamp != nil { + t := *options.Timestamp + params.Set("timestamp", strconv.FormatInt(t.Unix(), 10)) + } + var ( headers map[string]string err error |