mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Build arm64 docker image for arm-based Macs
Remove --patform args completely so that by default we build natively on each platform. Partial fix for #50
This commit is contained in:
parent
93a06d72f0
commit
9b3d98b20b
4 changed files with 2 additions and 7 deletions
|
@ -188,11 +188,9 @@ class Container(IsolationProvider):
|
||||||
container_runtime = self.get_runtime()
|
container_runtime = self.get_runtime()
|
||||||
|
|
||||||
if self.get_runtime_name() == "podman":
|
if self.get_runtime_name() == "podman":
|
||||||
platform_args = []
|
|
||||||
security_args = ["--security-opt", "no-new-privileges"]
|
security_args = ["--security-opt", "no-new-privileges"]
|
||||||
security_args += ["--userns", "keep-id"]
|
security_args += ["--userns", "keep-id"]
|
||||||
else:
|
else:
|
||||||
platform_args = ["--platform", "linux/amd64"]
|
|
||||||
security_args = ["--security-opt=no-new-privileges:true"]
|
security_args = ["--security-opt=no-new-privileges:true"]
|
||||||
|
|
||||||
# drop all linux kernel capabilities
|
# drop all linux kernel capabilities
|
||||||
|
@ -203,7 +201,6 @@ class Container(IsolationProvider):
|
||||||
|
|
||||||
args = (
|
args = (
|
||||||
["run", "--network", "none"]
|
["run", "--network", "none"]
|
||||||
+ platform_args
|
|
||||||
+ user_args
|
+ user_args
|
||||||
+ security_args
|
+ security_args
|
||||||
+ prevent_leakage_args
|
+ prevent_leakage_args
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Building container image"
|
echo "Building container image"
|
||||||
podman build container --platform linux/amd64 --tag dangerzone.rocks/dangerzone
|
podman build container --tag dangerzone.rocks/dangerzone
|
||||||
|
|
||||||
echo "Saving and compressing container image"
|
echo "Saving and compressing container image"
|
||||||
podman save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
|
podman save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Building container image"
|
echo "Building container image"
|
||||||
docker build container --platform linux/amd64 --tag dangerzone.rocks/dangerzone
|
docker build container --tag dangerzone.rocks/dangerzone
|
||||||
|
|
||||||
echo "Saving and compressing container image"
|
echo "Saving and compressing container image"
|
||||||
docker save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
|
docker save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
|
||||||
|
|
|
@ -10,8 +10,6 @@ def main():
|
||||||
"docker",
|
"docker",
|
||||||
"build",
|
"build",
|
||||||
"container",
|
"container",
|
||||||
"--platform",
|
|
||||||
"linux/amd64",
|
|
||||||
"--tag",
|
"--tag",
|
||||||
"dangerzone.rocks/dangerzone",
|
"dangerzone.rocks/dangerzone",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue