summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-02 14:25:29 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-02 14:25:29 -0500
commit5df6251402af9cc38172edb7802374fcf787d920 (patch)
tree779860725a73f4fbe19a48aadb96070be3b40114 /cmd/podman/images
parent426178a49991106ffe222f12cc42409ae78dd257 (diff)
downloadpodman-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 'cmd/podman/images')
-rw-r--r--cmd/podman/images/build.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index d6bf761db..0e1c47399 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -509,6 +509,11 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
TransientMounts: flags.Volumes,
}
+ if c.Flag("timestamp").Changed {
+ timestamp := time.Unix(flags.Timestamp, 0).UTC()
+ opts.Timestamp = &timestamp
+ }
+
return &entities.BuildOptions{BuildOptions: opts}, nil
}