Is there a reason that there is no equivalent of docker logout?
I imagine this would take a registry (str) and dockercfg_path (str) as parameters and simply remove the appropriate section from the file.
By design, docker-py doesn't modify the config file.
Is there some record of design discussions regarding this that I can read?
this would be useful, I'm using docker-py for validation testing which involves pulling image from a docker registry :)
This would be useful. Right now I'm having to run a subprocess call to log out of an ECR registry, because otherwise my credential store is attempting to use an expired temporary auth token from the last push I did, and ignoring the newly acquired token I'm passing to docker_client.login, despite passing reauth=True. If logout is verboten from the python SDK, maybe it'd be good if the login method actually paid attention to reauth?
Lets try 3 years later...do we have docker logout now? :)
Based on @shin- 's comment,
"By design, docker-py doesn't modify the config file."
It would suggest that docker-py logins are not persistent outside the session they were used in, could anyone verify this is the case?
Most helpful comment
Lets try 3 years later...do we have docker logout now? :)