Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present

Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
Doug Davis
2017-06-02 00:06:39 +00:00
committed by Tibor Vass
parent fb4c349f40
commit 0d41e6a758
+5 -1
View File
@@ -376,7 +376,11 @@ destination container.
All new files and directories are created with a UID and GID of 0.
In the case where `<src>` is a remote file URL, the destination will
have permissions of 600.
have permissions of 600. If the remote file being retrieved has an HTTP
`Last-Modified` header, the timestamp from that header will be used
to set the `mtime` on the destination file. Then, like any other file
processed during an `ADD`, `mtime` will be included in the determination
of whether or not the file has changed and the cache should be updated.
> **Note**:
> If you build by passing a `Dockerfile` through STDIN (`docker