mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
add again the --security-opt flag
Had previously been added but removed in a refactor (see commit 488dca).
This commit is contained in:
parent
e63c931800
commit
a02801cc2d
1 changed files with 6 additions and 0 deletions
|
@ -77,13 +77,18 @@ def convert(input_filename, output_filename, ocr_lang, stdout_callback):
|
|||
|
||||
if container_tech == "docker":
|
||||
platform_args = ["--platform", "linux/amd64"]
|
||||
security_args = ["--security-opt=no-new-privileges:true"]
|
||||
else:
|
||||
platform_args = []
|
||||
security_args = ["--security-opt", "no-new-privileges"]
|
||||
|
||||
|
||||
|
||||
# Convert document to pixels
|
||||
args = (
|
||||
["run", "--network", "none"]
|
||||
+ platform_args
|
||||
+ security_args
|
||||
+ [
|
||||
"-v",
|
||||
f"{input_filename}:/tmp/input_file",
|
||||
|
@ -105,6 +110,7 @@ def convert(input_filename, output_filename, ocr_lang, stdout_callback):
|
|||
args = (
|
||||
["run", "--network", "none"]
|
||||
+ platform_args
|
||||
+ security_args
|
||||
+ [
|
||||
"-v",
|
||||
f"{pixel_dir}:/dangerzone",
|
||||
|
|
Loading…
Reference in a new issue