gesellix/docker-client

Unable to delete certificate files in 'docker.cert.path'

urvashisingh opened this issue · 2 comments

We are using de.gesellix:docker-client:2017-07-19T21-12-05 to deploy services on a Docker swam cluster.

We have a process that accepts information on the Docker endpoint and the service to deploy as input. The process writes out the pem files to a temporary directory, configures the 'docker.cert.path' to point to this location before calling the DockerClient APIs which do all the work.
Finally the process needs to remove the pem files by simply deleting the temporary directory (the directory is created with a unique path every time allowing parallel runs to not clobber each other). I found that the files are not getting deleted after the DockerClient APIs are invoked. If I comment out the call to the APIs, then the deletion goes through fine. I suspect that the file streams to the pem files are opened somewhere in the docker-client code but they are never closed. This prevents the files from getting deleted.

Hey, you're right, the file readers haven't been closed after use. Thanks for the bug report!
The fresh docker-client release 2017-08-17T20-47-30 contains the necessary fix. Please note that the actual change happened in the internal dependency of the docker-engine library. Your dependency management tool should fetch the release version 2017-08-17T20-35-26.

Thank you for a super quick resolution! I am going to grab the 2017-08-17T20-47-30 docker-client release and try it out now.