dockerTools: fix permissions on base image

If the base image has been built with nixpkgs.dockerTools, the image
configuration and manifest are readonly so we first need to change
their permissions before removing them.

Fix #27632.
This commit is contained in:
Antoine Eiche 2017-07-31 12:25:35 +02:00 committed by Robin Gloster
parent 9de667042b
commit 9082b66096

View file

@ -437,8 +437,8 @@ rec {
echo "Unpacking base image..."
tar -C image -xpf "$fromImage"
# Do not import the base image configuration and manifest
chmod a+w image image/*.json
rm -f image/*.json
rm -f image/manifest.json
if [[ -z "$fromImageName" ]]; then
fromImageName=$(jshon -k < image/repositories|head -n1)