Repository navigation
Description
using compose version 1.2.0rc1, docker version 1.5.0
got this error when pulling image from private registry. The docker daemon is set with --insecure-regsitry=hostname:8443
Traceback (most recent call last):
File "", line 3, in
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 31, in main
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 27, in dispatch
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.docopt_command", line 24, in dispatch
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.command", line 59, in perform_command
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 464, in up
File "/code/build/docker-compose/out00-PYZ.pyz/compose.project", line 208, in up
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 214, in recreate_containers
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 197, in create_container
File "/code/build/docker-compose/out00-PYZ.pyz/docker.client", line 710, in pull
File "/code/build/docker-compose/out00-PYZ.pyz/docker.auth.auth", line 67, in resolve_repository_name
File "/code/build/docker-compose/out00-PYZ.pyz/docker.auth.auth", line 46, in expand_registry_url
docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled.
When I add --allow-insecure-ssl to the docker-compose, I get this error:
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 214, in recreate_containers
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 199, in create_container
File "/code/build/docker-compose/out00-PYZ.pyz/compose.progress_stream", line 37, in stream_output
File "/code/build/docker-compose/out00-PYZ.pyz/compose.progress_stream", line 50, in print_output_event
compose.progress_stream.StreamOutputError: Authentication is required.
I confirmed that I am logged in by doing a docker pull from the private registry and it works fine.
Thanks for looking...
Activity
envygeeks commentedon Mar 30, 2015
We have the same problem here, we are unable to pull from our private registry and I confirmed it is not us by manually pulling from the private registry simply using
docker pulland it worked.kpettijohn commentedon Apr 3, 2015
Just ran into this issue as well. Let me know if I can provide any additional details!
Normal docker pull
Docker info
Docker Compose
mattes commentedon Apr 16, 2015
same issue here!
schmunk42 commentedon Apr 20, 2015
@natarajanv the allow-insecure workaround works for me, see, could you double check your login hostname (shoudl be with
https://..../v1/)natarajanv commentedon Apr 20, 2015
Yes, it works now. so, need to do 2 things to make it to work:
have to use --allow-insecure-ssl in the command line
and edit the .dockercfg file, and add /v1/ to the URL
Not sure what will happen when I upgrade the registry to V2...
EntilZha commentedon May 15, 2015
I have run into this issue using registry V2, but my setup is slightly different. I have a V2 registry setup, with a self signed certificate, and said certificate placed in
/etc/docker/certs.d/domain.com/ca.crt(if I recall this is the path docker wants). Usingdocker pullworks correctly with1.6and latest version ofdocker-compose. Usingdocker-compose updoes not work and returns the exception:docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled..It seems like this should work correctly since docker should see it as a secured registry
natarajanv commentedon May 15, 2015
There is a new switch like -- allow-insecure-ssl or something like that. Do a help on the pull or up command to verify. Using that switch should solve this problem.
Sent with Good (www.good.com)
From: Pedro Rodriguez [email protected]
Sent: Friday, May 15, 2015 6:07:14 PM
To: docker/compose
Cc: Natarajan, Venkat
Subject: Re: [compose] unable to pull from private registry (#1175)
I have run into this issue using registry V2, but my setup is slightly different. I have a V2 registry setup, with a self signed certificate, and said certificate placed in /etc/docker/certs.d/domain.com/ca.crt (if I recall this is the path docker wants). Using docker pull works correctly with 1.6 and latest version of docker-compose. Using docker-compose up does not work and returns the exception: docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled..
It seems like this should work correctly since docker should see it as a secured registry
Reply to this email directly or view it on GitHubhttps://github.com//issues/1175#issuecomment-102535540.
EntilZha commentedon May 15, 2015
What does the switch do? I am going to guess that the insecure ssl would allow self signed certificates?
dockeritself solves this problem by allowing you to put theca.crtfile within/etc/docker/certs.d/domain.com/ca.crt,docker-composeshould honor that I think.EntilZha commentedon May 15, 2015
Based on the source code I read, that flag gets passed all the way to: https://github.com/docker/docker-py/blob/master/docker/auth/auth.py#L29 where it only changes
httpstohttpwhich would be incorrect, sincehttpsshould be used.antoineco commentedon May 21, 2015
Also facing this issue on a v2 private repo secured by a "legitimate" certificate (from Comodo)
As already mentioned,
docker pullsucceeds butdocker-compose pulldoesn'tEntilZha commentedon May 21, 2015
My problem ended up being that docker compose 1.2 had a bug where it couldn't parse image names correctly that had a custom port. Solution was to compile a binary from master where it was fixed by a refactor (don't know if it intentionally fixed issue) until 1.3 release.
steve-jansen commentedon Jun 10, 2015
I'm also seeing this issue with a private registry using a custom CA on docker-compose v1.2.0.
docker pull example.com/myimageworks as expected with the CA certs readable at/etc/pki/ca-trust/source/anchors/(CentOS 7.1, docker 1.6.0)docker-compose pullfails for the same image. CA certs are readable at both/etc/pki/ca-trust/source/anchors/and/etc/docker/certs.d/example.comSee also #1319
aanand commentedon Jun 10, 2015
Compose 1.3 contains a fix for registry authentication. Please try it out and tell us if your problems persist:
https://github.com/docker/compose/releases/tag/1.3.0rc2
schmunk42 commentedon Jun 10, 2015
@aanand I have a chicken-and-egg problem since 1.3.0, because it now throws an errors when an image can't be pulled.
I am using local images, built by docker-compose, which are falsely identified as library images, e.g.
image: app_srcleads toUnable to downloadlibrary/app_src`.How can I distinguish between local images and official ones from Docker Hub?
aanand commentedon Jun 10, 2015
@schmunk42 Does the image tag
app_src:latestdefinitely exist locally when the service in question is started? If so, Compose should not attempt to pull it. Please open an issue if it does.Are you trying to reuse an image that's built for another service? If so, that's probably the source of the problem. Replace
image: app_srcwithbuild: <same path as the other service>.3 remaining items
antoineco commentedon Jul 6, 2015
Same setup as @kuhnroyal, and same error message as @steve-jansen as described in #1319. Might be a duplicate issue.
kuhnroyal commentedon Jul 15, 2015
Not seeing this anymore after update to docker 1.7.1 and compose 1.3.2
antoineco commentedon Jul 15, 2015
compose 1.3.2 fixed it for us as well (Docker 1.6 and 1.7)
ITler commentedon Jul 20, 2015
Still see that problem with
My docker-compose.yml:
Sum up - I use
/etc/docker/certs.d/registry.mydomain.local/ca.crt(also triedmydomain.local/ca.crtand variants with port 443), because I useOutput of
docker-compose up -dexecuting on the registry's host machineThe registry log shows this error
BTW: Is it possible, that official documentation is deprecated regarding
http:addr- parameter?I get the above mentioned error message, only when using
http:address:or when not defining it at all.Using REST API works (don't know, if it is relevant for this problem), i.e.:
curl -k -X GET https://registry.mydomain.local/v2/ops/testimage/tags/list- worksI have to admit, I'm quite new to the docker world, but I conscientiously followed the docs. What else could I check?
aanand commentedon Jul 20, 2015
@ITler Did you pass
--allow-insecure-ssl?ITler commentedon Jul 20, 2015
This took me hours. I thought I could leave this as I took option 3 from official doc...?
Using
docker-compose up -d --allow-insecure-sslis not mentioned there in conjunction with self-signed certificates.antoineco commentedon Jul 20, 2015
Still it doesn't solve the problem, if you deployed your CA cert correctly compose shouldn't complain.
ITler commentedon Jul 21, 2015
Agree to @antoineco. Docker-compose can't expect to get official certificates, only. Self-signed certificates should always be accepted without complaining, especially (but not exclusively) within local networks... As a consequence, I agree to @EntilZha, too. If a self-signed certificate is provided as
/etc/docker/certs.d/domain.com/ca.crt/then docker-compose should use it, as it would be application-consistent and -transparent behaviour betweendocker pullanddocker-compose pull.Maybe one more hint. The name of the option allow-insecure-ssl infers another context for instance another technical behaviour like the webserver should use SSL v1 to v3, which is known to be insecure rather than just allowing self-signed certificates for communication between registry and docker-compose client.
aanand commentedon Jul 21, 2015
We're getting rid of
--allow-insecure-ssl(see #1736) as soon as the relevant fix is released in docker-py (see docker/docker-py#681). It's based on old Docker client behaviour that's since been changed.ITler commentedon Jul 21, 2015
Sounds good from my limited point of view. Thank you!
aanand commentedon Jul 23, 2015
Fixed by #1736 and released in Compose 1.4.0 RC2.
caleb commentedon Aug 15, 2015
I still can't pull from a private repository. I am logged in and
docker pull -a docker.example.com/mysqlworks fine, but using docker-compose I get:Any ideas? My server uses HTTPS, and is running the v2 registry.
evenfrost commentedon Aug 21, 2015
Having it with
docker-compose upand private repository with fresh installation on Ubuntu 15.04.Update common Prometheus files (docker#1175)