OVERLAY_APPLY_SCRIPT:"\nimport json, os, shutil, sys\nup, host = sys.argv[1], sys.argv[2]\nfor op in json.load(sys.stdin):\n dest = os.path.join(host, *op[\"relativePath\"].split(\"/\"))\n if op[\"type\"] == \"delete\":\n if os.path.islink(dest) or os.path.isfile(dest):\n os.remove(dest)\n elif os.path.isdir(dest):\n shutil.rmtree(dest)\n continue\n src = os.path.join(up, *op[\"relativePath\"].split(\"/\"))\n os.makedirs(os.path.dirname(dest), exist_ok=True)\n # A pre-existing symlink at dest must go first: os.path.isdir/isfile follow links, so a dir/file copy onto a\n # Host symlink would otherwise write *through* it and escape hostDir. After this every isdir(dest) below is honest.\n if os.path.islink(dest):\n os.remove(dest)\n if os.path.islink(src):\n os.symlink(os.readlink(src), dest)\n elif os.path.isdir(src):\n if os.path.lexists(dest) and not os.path.isdir(dest):\n os.remove(dest)\n os.makedirs(dest, exist_ok=True)\n shutil.copystat(src, dest)\n else:\n if os.path.isdir(dest):\n shutil.rmtree(dest)\n shutil.copy2(src, dest)\n" = ...