docker-archive / dockercloud-cli

CLI for Docker Cloud
https://cloud.docker.com/
Apache License 2.0
74 stars 40 forks source link

dockercloud-cli [1.0.8] does not use DOCKER_CONFIG #53

Open schmunk42 opened 7 years ago

schmunk42 commented 7 years ago

I tried to run docker-cloud in a container, with a custom config file location for the Docker client under:

DOCKER_CONFIG=/roj/config

While I can do a docker login, including the information written to the above file, it looks like docker-cloud does not respect these settings.

I have to use the env vars DOCKERCLOUD_USERand DOCKERCLOUD_PASS.

tifayuki commented 7 years ago

That's true. The path of the config file is hard-coded in the python SDK at the moment: https://github.com/docker/python-dockercloud/blob/3df41bf76038e3ee7b03da7b110896f35ec1398d/dockercloud/__init__.py#L31

Other than setting DOCKERCLOUD_USER and DOCKERCLOUD_PASS, you can also try to use the container version: alias docker-cloud="docker run -it -v /roj/config/.docker:/root/.docker:ro --rm dockercloud/cli"