Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose doesn't read ~/.docker/config.json #1590

Closed
sschepens opened this issue Jun 22, 2015 · 26 comments
Closed

Compose doesn't read ~/.docker/config.json #1590

sschepens opened this issue Jun 22, 2015 · 26 comments
Labels
Milestone

Comments

@sschepens
Copy link

Seems like with docker 1.7 and docker-compose 1.3.1 authentication is broken and docker-compose fails to download private repositories on docker hub.
This used to work with docker 1.6 and compose 1.2.

@thomasbellio
Copy link

+1 one, I am also experiencing this issue. I am getting an:

http error err=No Such image statuscode=404
Error from v2 registry: Authentication Required

@jbiel
Copy link

jbiel commented Jun 23, 2015

See moby/moby#14092

@juhasz
Copy link

juhasz commented Jun 24, 2015

No, moby/moby#14092 is about private registries, but compose currently can't even authenticate to dockerhub. But it's not that simple:

Before Docker 1.7.0 docker registry authentications were stored in the ~/.dockercfg, but now they are stored in ~/.docker/config.json.

With updating to Docker 1.7.0 the contents of ~/.dockercfg were migrated, but the old file wasn't removed. (See moby/moby#12009.)

But docker compose (or I think it's a docker-py issue), still use ~/.dockercfg. So if you were logged in before, docker-compose will work with DockerHub authentication, but if you log in with a freshly installed 1.7.0 Docker, compose will not find the authentication config.

@jbiel
Copy link

jbiel commented Jun 24, 2015

Apologies, my mistake.

@volcomism
Copy link

+1

compose.progress_stream.StreamOutputError: Error: image blah/blah:latest not found

@paulsjv
Copy link

paulsjv commented Jun 30, 2015

@volcomism exact same error message here. DC 1.3.1 Docker 1.7.0

@aanand aanand added this to the 1.3.1 milestone Jul 1, 2015
@aanand aanand added the kind/bug label Jul 1, 2015
@aanand aanand changed the title Authentication broken Compose doesn't read ~/.docker/config.json Jul 1, 2015
@aanand
Copy link

aanand commented Jul 1, 2015

We need to update to docker-py 1.3.0 once it's out.

@shanielh
Copy link

shanielh commented Jul 6, 2015

Same issue here, I managed to fix it by copying and modifying contents of ~/.dockercfg (from ~/.docker/config.json)

@aanand
Copy link

aanand commented Jul 14, 2015

Closed in #1688.

@aanand aanand closed this as completed Jul 14, 2015
@caiges
Copy link

caiges commented Jul 15, 2015

I'm running into this with with docker 1.7.1 and docker-compose 1.3.2. I can connect to our private registry using docker directly but docker-compose fails authentication. @tnoeding

@aanand
Copy link

aanand commented Jul 15, 2015

@caiges do you have a ~/.dockercfg or a ~/.docker/config.json? If the former, it's not this bug.

@aanand
Copy link

aanand commented Jul 15, 2015

If the latter, please comment in #75 with your version info + registry version.

@mark878
Copy link

mark878 commented Aug 13, 2015

FYI: I have his same problem with docker 1.7.1 and I tried docker-compose 1.4RC2

@aanand
Copy link

aanand commented Aug 13, 2015

@mark878 do you have a ~/.dockercfg or a ~/.docker/config.json?

@mark878
Copy link

mark878 commented Aug 13, 2015

|~/.docker/config.json
I'll try using a .dockercfg today

|On 8/13/2015 5:47 AM, Aanand Prasad wrote:

@mark878 https://github.com/mark878 do you have a |/.dockercfg| or
a |
/.docker/config.json|?


Reply to this email directly or view it on GitHub
#1590 (comment).

@mark878
Copy link

mark878 commented Aug 14, 2015

I tried both and the same result. But I need to redo the "test" to be
sure. Debugging my issue today took most of the day. I couldn't pull
anything from my repository. Turned out to be docker 1.8 that was
release (today?). Went back to 1.7.1 and docker could pull. Let you
know tomorrow.

Mark

On 8/13/2015 5:47 AM, Aanand Prasad wrote:

@mark878 https://github.com/mark878 do you have a |/.dockercfg| or
a |
/.docker/config.json|?


Reply to this email directly or view it on GitHub
#1590 (comment).

@aanand
Copy link

aanand commented Aug 14, 2015

@mark878 Does this mean that plain docker pull (i.e. not docker-compose) doesn't work for you with Docker 1.8?

@mark878
Copy link

mark878 commented Aug 14, 2015

On 8/14/2015 6:24 AM, Aanand Prasad wrote:

@mark878 https://github.com/mark878 Does this mean that plain
|docker pull| (i.e. not |docker-compose|) doesn't work for you with
Docker 1.8?


Reply to this email directly or view it on GitHub
#1590 (comment).

Haven't tried that, but I expect it would -something to try today if I
have time. I built my own centos 7.5 image and pushed/pulled with my
own registry. (I got to get elasticsearch back up running as well as
build a spark cluster -all dockerized.)

@mark878
Copy link

mark878 commented Aug 15, 2015

Ok, I used aws and used a micro instance with RHEL 7.x (7.5 I think) to
test docker1.8.1. Didn't work. I installed the repo and did a yum
install. docker -d would run, but sudo service docker start didn't.
The steps to reproduce were:

instantiate a micro instance. add the repo. sudo yum update
docker-engine. sudo service docker start. Did some debugging. but
everythin looked ok The script would just hang and then time out

I'll try yum update and see if anything changes. I'll also run docker
-d and then try a pull. Let you know Monday pm.

Had some other (strange) issues with the kibana docker-startup script.
under centos 7.5 and redhat 7.5. sed s!!\1! was am
issue with bash. had to change it to
sed s##\1# to work. Took hours to trace it.

Hope this helps someone

Mark

On 8/14/2015 6:24 AM, Aanand Prasad wrote:

@mark878 https://github.com/mark878 Does this mean that plain
|docker pull| (i.e. not |docker-compose|) doesn't work for you with
Docker 1.8?


Reply to this email directly or view it on GitHub
#1590 (comment).

@mark878
Copy link

mark878 commented Sep 10, 2015

Been on vacation. But yes I do. But before I run compose, I did a pull
On Aug 13, 2015 5:47 AM, "Aanand Prasad" notifications@github.com wrote:

@mark878 https://github.com/mark878 do you have a ~/.dockercfg or a
~/.docker/config.json?


Reply to this email directly or view it on GitHub
#1590 (comment).

@nick-allen
Copy link

Compose (1.4.2) does not seem to be acknowledging the DOCKER_CONFIG environment variable, looking only for ~/.docker/config.json, regardless of what DOCKER_CONFIG is set to.

@dnephin
Copy link

dnephin commented Sep 22, 2015

docker-py will need to support that environment variable. Could you open an issue here: https://github.com/docker/docker-py

Once it's in docker-py compose should pick it up on the next release

@nick-allen
Copy link

Done

docker/docker-py#785

@houtianze
Copy link

I installed Docker Toolbox v1.9.0, on Windows, command docker seem still doesn't read the ~/.docker/config.json,

@deeky666
Copy link

Compose (1.4.2) does not seem to be acknowledging the DOCKER_CONFIG environment variable, looking only for ~/.docker/config.json, regardless of what DOCKER_CONFIG is set to.

Compose still ignores DOCKER_CONFIG environment variable, even though it seems to be supported by docker-py.

docker-compose version 1.25.1, build a82fef07
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

Am I missing something here?

@samizdam
Copy link

+1
Compose ignore env var

$ docker -v
Docker version 19.03.5, build 633a0ea838

$ docker-compose version
docker-compose version 1.25.3, build d4d1b42b
docker-py version: 4.1.0
CPython version: 3.7.5
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests