check i686 directly
This commit is contained in:
@@ -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
|
||||||
|
if self.enforce_32_bit:
|
||||||
|
# If the architecture running the image is already the right one
|
||||||
|
# or the image entrypoint takes care of enforcing this, then we don't need to
|
||||||
|
# simulate this
|
||||||
container_machine = call(
|
container_machine = call(
|
||||||
self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True
|
self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True
|
||||||
).strip()
|
).strip()
|
||||||
if container_machine not in {"x86_64", "aarch64"}:
|
simulate_32_bit = container_machine != "i686"
|
||||||
# either the architecture running the image is already the right one
|
|
||||||
# or the image entrypoint took care of this
|
|
||||||
simulate_32_bit = False
|
|
||||||
|
|
||||||
shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"]
|
shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user