Revert "Remove hard-coded shell info to use the docker ENTRYPOINT instead"

This reverts commit a052c71aec.
This commit is contained in:
Joe Rickerby
2020-06-25 10:39:26 +01:00
parent 850d109582
commit dd4fc69e7c
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -26,11 +26,13 @@ class DockerContainer:
bash_stdin: IO[str] bash_stdin: IO[str]
bash_stdout: IO[str] bash_stdout: IO[str]
def __init__(self, docker_image: str): def __init__(self, docker_image: str, simulate_32_bit=False):
self.docker_image = docker_image self.docker_image = docker_image
self.simulate_32_bit = simulate_32_bit
def __enter__(self) -> 'DockerContainer': def __enter__(self) -> 'DockerContainer':
self.container_name = f'cibuildwheel-{uuid.uuid4()}' self.container_name = f'cibuildwheel-{uuid.uuid4()}'
shell_args = ['linux32', '/bin/bash'] if self.simulate_32_bit else ['/bin/bash']
subprocess.run( subprocess.run(
[ [
'docker', 'create', 'docker', 'create',
@@ -38,7 +40,8 @@ class DockerContainer:
'--name', self.container_name, '--name', self.container_name,
'-i', '-i',
'-v', '/:/host', # ignored on CircleCI '-v', '/:/host', # ignored on CircleCI
self.docker_image self.docker_image,
*shell_args
], ],
check=True, check=True,
) )
+1 -1
View File
@@ -110,7 +110,7 @@ def build(options: BuildOptions) -> None:
continue continue
try: try:
with DockerContainer(docker_image) as docker: with DockerContainer(docker_image, simulate_32_bit=platform_tag.endswith('i686')) as docker:
docker.copy_into(Path.cwd(), Path('/project')) docker.copy_into(Path.cwd(), Path('/project'))
if options.before_all: if options.before_all: