Do not use tar to make hashes

As it includes timestanps in the tarball it does not make a stable
hash; use contents of the files instead.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-01-17 13:48:26 +00:00
parent 975b598089
commit 0bd7f620ff
4 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ container: Dockerfile $(DEPS)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
hash: Dockerfile $(DEPS)
tar cf - $^ | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
push: hash container
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \

View File

@ -32,7 +32,7 @@ container: Dockerfile $(DEPS)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
hash: Dockerfile $(DEPS)
tar cf - $^ | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
push: hash container
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \

View File

@ -1,5 +1,5 @@
# Tag: 6571d9d0c5c2592848f4f0202d1cd2c4466d9979
BINFMT_IMAGE=mobylinux/binfmt@sha256:6810b978316198cf4c507b901cfb676acd655955c380d2c98f23f7232ea6381f
# Tag: 8c52d6a837be80b4e0535b5d9e693b604e970f7d
BINFMT_IMAGE=mobylinux/binfmt@sha256:4f1d647bfdd46cf015f7c7b161687fe9557647b4542245d45f714774446730ed
default: config.json

View File

@ -1,5 +1,5 @@
# Tag: 6fb2e0bd1844349222ad57af92b5c627fd73375a
RNGD_IMAGE=mobylinux/rngd@sha256:8370ecd6f5d2092b27b40c2dabe25a2cbeb6469dd6e973c27a5152af6ab8d12a
# Tag: 3dad6dd43270fa632ac031e99d1947f20b22eec9
RNGD_IMAGE=mobylinux/rngd@sha256:1c93c1db7196f6f71f8e300bc1d15f0376dd18e8891c8789d77c8ff19f3a9a92
default: config.json