mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
7795b1c697
the image export, that is used in `docker save` previous has just had the layers times (atimes, mtimes) be when the save was done. ```bash vbatts@valse ~ (master) $ docker save busybox | tar tv drwxr-xr-x 0/0 0 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/ -rw-r--r-- 0/0 3 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/VERSION -rw-r--r-- 0/0 1405 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/json -rw-r--r-- 0/0 2643968 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/layer.tar drwxr-xr-x 0/0 0 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/ -rw-r--r-- 0/0 3 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/VERSION -rw-r--r-- 0/0 1346 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/json -rw-r--r-- 0/0 1024 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/layer.tar drwxr-xr-x 0/0 0 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/ -rw-r--r-- 0/0 3 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/VERSION -rw-r--r-- 0/0 1181 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/json -rw-r--r-- 0/0 1024 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/layer.tar -rw-r--r-- 0/0 90 2015-09-03 22:22 repositories ``` With this change, the layer's directory and artifact will have times matching the image layer's created time. The "repositories" file is set to epoch. ```bash vbatts@valse ~ (master) $ docker save busybox | tar tv drwxr-xr-x 0/0 0 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/ -rw-r--r-- 0/0 3 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/VERSION -rw-r--r-- 0/0 1405 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/json -rw-r--r-- 0/0 2643968 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/layer.tar drwxr-xr-x 0/0 0 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/ -rw-r--r-- 0/0 3 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/VERSION -rw-r--r-- 0/0 1346 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/json -rw-r--r-- 0/0 1024 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/layer.tar drwxr-xr-x 0/0 0 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/ -rw-r--r-- 0/0 3 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/VERSION -rw-r--r-- 0/0 1181 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/json -rw-r--r-- 0/0 1024 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/layer.tar -rw-r--r-- 0/0 90 1969-12-31 19:00 repositories ``` Side effect of this is that the tar stream from `docker save` is now more deterministic. ```bash vbatts@valse ~ (master) $ docker save busybox | sha1sum baf03e30ef79ca4d9c5e512d3a1b873880f404ca - vbatts@valse ~ (master) $ docker save busybox | sha1sum baf03e30ef79ca4d9c5e512d3a1b873880f404ca - vbatts@valse ~ (master) $ docker save busybox | sha1sum baf03e30ef79ca4d9c5e512d3a1b873880f404ca - vbatts@valse ~ (master) $ docker save busybox | sha1sum baf03e30ef79ca4d9c5e512d3a1b873880f404ca - ``` Signed-off-by: Vincent Batts <vbatts@redhat.com> |
||
---|---|---|
.. | ||
tags | ||
export.go | ||
graph.go | ||
graph_test.go | ||
history.go | ||
import.go | ||
list.go | ||
load.go | ||
load_unsupported.go | ||
mutex.go | ||
pools_test.go | ||
pull.go | ||
pull_v1.go | ||
pull_v2.go | ||
push.go | ||
push_v1.go | ||
push_v2.go | ||
registry.go | ||
service.go | ||
tags.go | ||
tags_unit_test.go |