Open uhinze opened 4 years ago
The issue is that docker
doesn't supply any parameters to docker-credential-gcr
via the credential store API. However, you should be able to use the DOCKER_CONFIG
ENV var to specify the directory containing the desired dockerconfig for both docker
and docker-credential-gcr
Thanks for responding!
What I have in mind is this:
docker-credential-gcr configure-docker --config /foo/bar
-> writes /foo/bar/config.json
docker run eu.gcr.io/my/image --config /foo/bar
<- reads /foo/bar/config.json
and authenticates with the helper.
Got it.
FYI only the config directory is user-configurable, config.json
is hard-coded.
Docker has a global
--config
flag documented here: https://docs.docker.com/engine/reference/commandline/cli/Through this, you can define the location of
config.json
.docker-credential-gcr configure-docker
currently always generates the config file in~/.docker
. It would be nice to be able to modify this in the same way as in Docker.I try to issue
docker-credential-gcr configure-docker
during the startup of a COS VM in GCP. It gives me an error that/root/.docker
is a read-only filesystem, so I'd just like to put the file somewhere else.