mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12: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":
|
if container_tech == "docker":
|
||||||
platform_args = ["--platform", "linux/amd64"]
|
platform_args = ["--platform", "linux/amd64"]
|
||||||
|
security_args = ["--security-opt=no-new-privileges:true"]
|
||||||
else:
|
else:
|
||||||
platform_args = []
|
platform_args = []
|
||||||
|
security_args = ["--security-opt", "no-new-privileges"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Convert document to pixels
|
# Convert document to pixels
|
||||||
args = (
|
args = (
|
||||||
["run", "--network", "none"]
|
["run", "--network", "none"]
|
||||||
+ platform_args
|
+ platform_args
|
||||||
|
+ security_args
|
||||||
+ [
|
+ [
|
||||||
"-v",
|
"-v",
|
||||||
f"{input_filename}:/tmp/input_file",
|
f"{input_filename}:/tmp/input_file",
|
||||||
|
@ -105,6 +110,7 @@ def convert(input_filename, output_filename, ocr_lang, stdout_callback):
|
||||||
args = (
|
args = (
|
||||||
["run", "--network", "none"]
|
["run", "--network", "none"]
|
||||||
+ platform_args
|
+ platform_args
|
||||||
|
+ security_args
|
||||||
+ [
|
+ [
|
||||||
"-v",
|
"-v",
|
||||||
f"{pixel_dir}:/dangerzone",
|
f"{pixel_dir}:/dangerzone",
|
||||||
|
|
Loading…
Reference in a new issue