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>
master
Doug Davis 2014-10-22 11:16:42 -07:00 committed by Tibor Vass
parent fb4c349f40
commit 0d41e6a758
1 changed files with 5 additions and 1 deletions

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