diff --git a/src/recastatlas/backends/docker.py b/src/recastatlas/backends/docker.py index 883ceb0..1a3428b 100644 --- a/src/recastatlas/backends/docker.py +++ b/src/recastatlas/backends/docker.py @@ -38,6 +38,11 @@ def setup_docker(): "/var/run/docker.sock:/var/run/docker.sock", ] + # Set from DOCKER_DEFAULT_PLATFORM environment variable if it exists + if "platform" in config.backends[backend]: + if _platform := config.backends[backend]["platform"]: + command += ["--platform", _platform] + if "cvmfs" in config.backends[backend]: command += [ "-e", diff --git a/src/recastatlas/config.py b/src/recastatlas/config.py index 2569bfe..1dfec6e 100644 --- a/src/recastatlas/config.py +++ b/src/recastatlas/config.py @@ -46,6 +46,7 @@ def backends(self): "image": conf_from_env( "RECAST_DOCKER_IMAGE", "recast/recastatlas:v0.3.0" ), + "platform": conf_from_env("DOCKER_DEFAULT_PLATFORM"), "cvmfs": {"location": "/cvmfs", "propagation": "rprivate"}, "reg": { "user": conf_from_env("RECAST_REGISTRY_USERNAME"),