diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-03 05:08:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 05:08:13 -0500 |
commit | aed632cb8ca4be2a57e8159041ef31829b3d2b2c (patch) | |
tree | 3b2727896ad022b7232244aea77e845f9f65a589 /pkg/api | |
parent | 2a3460b26dc7056189abbbfd19c1f37367fa6b6c (diff) | |
parent | 5df6251402af9cc38172edb7802374fcf787d920 (diff) | |
download | podman-aed632cb8ca4be2a57e8159041ef31829b3d2b2c.tar.gz podman-aed632cb8ca4be2a57e8159041ef31829b3d2b2c.tar.bz2 podman-aed632cb8ca4be2a57e8159041ef31829b3d2b2c.zip |
Merge pull request #9580 from rhatdan/timestamp
Fix support for podman build --timestamp
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/compat/images_build.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index d79b100e8..009fcf7e8 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -104,6 +104,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { Squash bool `schema:"squash"` Tag []string `schema:"t"` Target string `schema:"target"` + Timestamp int64 `schema:"timestamp"` }{ Dockerfile: "Dockerfile", Registry: "docker.io", @@ -318,6 +319,11 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { Target: query.Target, } + if _, found := r.URL.Query()["timestamp"]; found { + ts := time.Unix(query.Timestamp, 0) + buildOptions.Timestamp = &ts + } + runCtx, cancel := context.WithCancel(context.Background()) var imageID string go func() { |