zalando-stups / pierone-cli

DEPRECATED: Convenient command line client for STUPS' Pier One Docker registry
http://docs.stups.io/en/latest/components/pierone.html#command-line-client
Other
10 stars 13 forks source link

Recurring issue with Docker auth #81

Closed hjacobs closed 4 years ago

hjacobs commented 5 years ago

There is a recurring issue (sporadically popping up in Zalando support chats) about docker pull not working after doing pierone login --- usually users have to delete ~/.docker and it works again. Let's fix this once and for all.

pmeinhardt commented 5 years ago

IMHO pierone should not meddle with system-wide config files at all.

Instead it could act as a wrapper and use its own config directory (see the docker --config flag or the DOCKER_CONFIG env variable) so docker will continue to work as expected. I don't have a clear idea of what the command-line interface would look like then but I think an approach along those lines would be much cleaner 🤔

Just my 2 cents though 🤷‍♂

pmeinhardt commented 5 years ago

One common pattern for many command-line tools is to expose an init subcommand to initialize the shell environment. E.g.

eval $(pierone init)

This could take care of setting up the environment and do something like

export DOCKER_CONFIG=~/.pierone/docker

It's not super convenient, but maybe some food for thought ✌️