From 5df6251402af9cc38172edb7802374fcf787d920 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 2 Mar 2021 14:25:29 -0500 Subject: 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 --- cmd/podman/images/build.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/podman') 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 = ×tamp + } + return &entities.BuildOptions{BuildOptions: opts}, nil } -- cgit v1.2.3-54-g00ecf