check i686 directly

This commit is contained in:
mayeut
2023-09-18 21:28:33 +02:00
parent 137dc1a2cf
commit cf7586ce7e
+8 -7
View File
@@ -111,13 +111,14 @@ class OCIContainer:
network_args = ["--network=host"] network_args = ["--network=host"]
simulate_32_bit = self.enforce_32_bit simulate_32_bit = self.enforce_32_bit
container_machine = call( if self.enforce_32_bit:
self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True # If the architecture running the image is already the right one
).strip() # or the image entrypoint takes care of enforcing this, then we don't need to
if container_machine not in {"x86_64", "aarch64"}: # simulate this
# either the architecture running the image is already the right one container_machine = call(
# or the image entrypoint took care of this self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True
simulate_32_bit = False ).strip()
simulate_32_bit = container_machine != "i686"
shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"] shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"]