mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-30 10:42:37 +02:00
When running containers, explictly use path to python3 and .py file, and --force when deleting the obsolete image
This commit is contained in:
parent
7e74371edd
commit
1d08e12f5e
2 changed files with 5 additions and 3 deletions
|
@ -85,7 +85,8 @@ def convert(input_filename, output_filename, ocr_lang, stdout_callback):
|
||||||
"-v",
|
"-v",
|
||||||
f"{pixel_dir}:/dangerzone",
|
f"{pixel_dir}:/dangerzone",
|
||||||
container_name,
|
container_name,
|
||||||
"dangerzone.py",
|
"/usr/bin/python3",
|
||||||
|
"/usr/local/bin/dangerzone.py",
|
||||||
"document-to-pixels",
|
"document-to-pixels",
|
||||||
]
|
]
|
||||||
ret = exec_container(args, stdout_callback)
|
ret = exec_container(args, stdout_callback)
|
||||||
|
@ -110,7 +111,8 @@ def convert(input_filename, output_filename, ocr_lang, stdout_callback):
|
||||||
"-e",
|
"-e",
|
||||||
f"OCR_LANGUAGE={ocr_lang}",
|
f"OCR_LANGUAGE={ocr_lang}",
|
||||||
container_name,
|
container_name,
|
||||||
"dangerzone.py",
|
"/usr/bin/python3",
|
||||||
|
"/usr/local/bin/dangerzone.py",
|
||||||
"pixels-to-pdf",
|
"pixels-to-pdf",
|
||||||
]
|
]
|
||||||
ret = exec_container(args, stdout_callback)
|
ret = exec_container(args, stdout_callback)
|
||||||
|
|
|
@ -485,7 +485,7 @@ class GlobalCommon(object):
|
||||||
print(f"Deleting old dangerzone container image")
|
print(f"Deleting old dangerzone container image")
|
||||||
|
|
||||||
subprocess.check_output(
|
subprocess.check_output(
|
||||||
[self.get_container_runtime(), "rmi", found_image_id],
|
[self.get_container_runtime(), "rmi", "--force", found_image_id],
|
||||||
startupinfo=self.get_subprocess_startupinfo(),
|
startupinfo=self.get_subprocess_startupinfo(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue