You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using docker-py in two cron jobs, create_container() in one of them produced the error message:
APIError: 409 Client Error: Conflict ("{"message":"Conflict. The name \"/temp_cont\" is already in use by container <HASH>. You have to remove (or rename) that container to be able to reuse that name."}")
Obviously, this was caused by using the same name for the temporary container in both jobs. However, the container doesn't exist anymore and I still get the error when running only one of the jobs manually. In fact, I even tried using a different name. So I'm not trying to name it "temp_cont" anymore, but it thinks I am. It seems to be caching the previous command somewhere.
I'm only seeing this issue using docker-py, and not using docker create or docker run from the command line. docker ps --all doesn't show a container with that hash, and it's not in /var/lib/docker/containers.
i have the same issue when i use then name attribute :
appContainer = client.containers.run(
image=imageTag,
remove=True,
stdout=False,
stderr=True,
name="appcontainer"
network_mode="host",
volumes=volumes,
privileged=True,
command=command
)
While using docker-py in two cron jobs,
create_container()
in one of them produced the error message:Obviously, this was caused by using the same name for the temporary container in both jobs. However, the container doesn't exist anymore and I still get the error when running only one of the jobs manually. In fact, I even tried using a different name. So I'm not trying to name it "temp_cont" anymore, but it thinks I am. It seems to be caching the previous command somewhere.
I'm only seeing this issue using docker-py, and not using
docker create
ordocker run
from the command line.docker ps --all
doesn't show a container with that hash, and it's not in/var/lib/docker/containers
.Also see the related issue in the docker repo.
The text was updated successfully, but these errors were encountered: