mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Merge pull request #9580 from rhatdan/timestamp
Fix support for podman build --timestamp
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user