Manifest file already exists
Hi Guido,
I wanted to remove the /database volume from the ibmcom/db2 image.
But when I process it with your script using:
docker-copyedit.py FROM ibmcom/db2:latest INTO db2:1.0 REMOVE ALL VOLUMES
I get the error that the manifest file already exists:
Traceback (most recent call last): File "docker-copyedit.py", line 929, in <module> edit_image(inp, out, commands) File "docker-copyedit.py", line 301, in edit_image changed = edit_datadir(datadir, out_tag, edits) File "docker-copyedit.py", line 723, in edit_datadir os.rename(manifest_filename + ".tmp", manifest_filename) FileExistsError: [WinError 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: 'load.tmp\\data\\manifest.json.tmp' -> 'load.tmp\\data\\manifest.json'
I tried to fix it but I'am a novice to python.
Thanks Mario
Please try to change "if podman()" on line 720 into "if True".
Finally I got beyond this rename by adding these lines before 723:
if os.path.isfile(manifest_filename + ".old"):
os.remove(manifest_filename + ".old")
if True:
os_jsonfile(manifest_filename)
os.rename(manifest_filename, manifest_filename + ".old")
in v1.4.6097