New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-commit and ADD/COPY truncate file and directory modification times #17175
Comments
Just ran into this today. The only conceivable workaround is taring files up, COPYing them and extracting again... UPDATE the additional tar operations made things overall slower. |
Given this issue has been open for so long, I assume it can be hard to fix in Docker. I'm curious why it would be hard to preserve the timestamp during |
This bug makes it basically impossible to select only parts you need from an existing stage using "COPY --from"--because every time you do, it messes something up in the subset. Since usually if you compose things you do NOT want to have tools like tar&co available (except when you are the author of tar, I guess), the tar workaround is a hack, too. Also, let's say you use something else to either preserve or fix up the timestamp inside the docker image, now your docker image is twice the size. Therefore, the feature of preserving timestamps is necessary. |
This issue is interacting badly with workflows where the context contains artifacts that were partially built before the Dockerfile runs, but which a tool like Inside the Dockerfile build process, |
the same issue, the timestamps are completely incorrect, and the timestamps of the files in the directory copied at the same time can vary by several hours |
Steps to reproduce:
COPY:
Actual results: the modification time of
/example-file
is reported to be2015-10-19 13:13:28.000000000 +0000
.Expected results: the modification time of
/example-file
should be2015-10-19 13:13:28.441785563 +0000
.docker-commit
:Why is this important?
Some build systems rely on modification timestamps to detect file updates.
Environment details:
cat /etc/lsb-release
:uname -a
:docker version
:docker info
:The text was updated successfully, but these errors were encountered: