Merge pull request #101403 from mickours
Fix broken pipe error on docker layer creation
This commit is contained in:
commit
06df74607f
@ -340,7 +340,7 @@ rec {
|
|||||||
# Tar up the layer and throw it into 'layer.tar'.
|
# Tar up the layer and throw it into 'layer.tar'.
|
||||||
echo "Packing layer..."
|
echo "Packing layer..."
|
||||||
mkdir $out
|
mkdir $out
|
||||||
tarhash=$(tar -C layer --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=${toString uid} --group=${toString gid} -cf - . | tee $out/layer.tar | tarsum)
|
tarhash=$(tar -C layer --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=${toString uid} --group=${toString gid} -cf - . | tee -p $out/layer.tar | tarsum)
|
||||||
|
|
||||||
# Add a 'checksum' field to the JSON, with the value set to the
|
# Add a 'checksum' field to the JSON, with the value set to the
|
||||||
# checksum of the tarball.
|
# checksum of the tarball.
|
||||||
@ -425,7 +425,7 @@ rec {
|
|||||||
echo "Packing layer..."
|
echo "Packing layer..."
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
tarhash=$(tar -C layer --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cf - . |
|
tarhash=$(tar -C layer --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cf - . |
|
||||||
tee $out/layer.tar |
|
tee -p $out/layer.tar |
|
||||||
${tarsum}/bin/tarsum)
|
${tarsum}/bin/tarsum)
|
||||||
|
|
||||||
cat ${baseJson} | jshon -s "$tarhash" -i checksum > $out/json
|
cat ${baseJson} | jshon -s "$tarhash" -i checksum > $out/json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user