Fix 404 not found errors when using docker
This commit is contained in:
parent
0dc011684d
commit
d781709cb5
|
|
@ -1,5 +1,3 @@
|
|||
import time
|
||||
|
||||
import docker
|
||||
from loguru import logger
|
||||
|
||||
|
|
@ -88,15 +86,6 @@ def run_container(
|
|||
if detach:
|
||||
logger.debug("Container %s launched." % image_name)
|
||||
elif auto_remove:
|
||||
# Workaround to avoid
|
||||
# "Conflict. The container name xxx is already in use"
|
||||
# Because it seems that the container name is not freed when the
|
||||
# run command completes
|
||||
while client.containers.list(
|
||||
all=True, filters={"name": container_name}
|
||||
):
|
||||
time.sleep(1)
|
||||
|
||||
logger.debug("Container closed.")
|
||||
|
||||
return container
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user