Merge pull request #366 from YannickJadoul/ignore-docker-rm

Ignore errors when cleaning up docker container in linux.py
This commit is contained in:
Yannick Jadoul
2020-06-02 21:45:50 +02:00
committed by GitHub
+3 -3
View File
@@ -114,10 +114,9 @@ def build(options: BuildOptions) -> None:
if not platform_configs: if not platform_configs:
continue continue
container_name = f'cibuildwheel-{uuid.uuid4()}'
try:
shell_cmd = ['linux32', '/bin/bash'] if platform_tag.endswith("i686") else ['/bin/bash'] shell_cmd = ['linux32', '/bin/bash'] if platform_tag.endswith("i686") else ['/bin/bash']
container_name = f'cibuildwheel-{uuid.uuid4()}'
call(['docker', 'create', call(['docker', 'create',
'--env', 'CIBUILDWHEEL', '--env', 'CIBUILDWHEEL',
'--name', container_name, '--name', container_name,
@@ -126,6 +125,7 @@ def build(options: BuildOptions) -> None:
docker_image, docker_image,
'/bin/bash']) '/bin/bash'])
try:
call(['docker', 'cp', '.', container_name + ':/project']) call(['docker', 'cp', '.', container_name + ':/project'])
call(['docker', 'start', container_name]) call(['docker', 'start', container_name])