Repository navigation
Closed
Description
Hi,
I was trying to pull an image from private registry and I received this message:
[root@baleia sinesp-seguranca]# docker-compose up
Creating sinespseguranca_ldap_1...
Pulling image baleia:5000/sinesp.ldap:latest...
Traceback (most recent call last):
File "<string>", line 3, in <module>
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 445, in up
File "/code/build/docker-compose/out00-PYZ.pyz/compose.project", line 184, in up
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 259, in recreate_containers
File "/code/build/docker-compose/out00-PYZ.pyz/compose.service", line 242, in create_container
File "/code/build/docker-compose/out00-PYZ.pyz/docker.client", line 824, 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.
[root@baleia sinesp-seguranca]#
This is my docker-compose.yml file content:
ldap:
image: baleia:5000/sinesp.ldap
command: /run.sh
ports:
- "389:389"
- "9830:9830"
environment:
ADMIN_DOMAIN: sinesp.bsa.serpro
SERVER_IDENTIFIER: sinesp
FULL_MACHINE_NAME: ldap.sinesp.bsa.serpro
CONFIG_DIR_ADMIN_PWD: password1
ROOT_DN_PWD: password2
SUFFIX: dc=sinesp,dc=bsa,dc=serpro
hostname: ldap.sinesp.bsa.serpro
And this is my /etc/sysconfig/docker file content:
# /etc/sysconfig/docker
# Modify these options if you want to change the way the docker daemon runs
OPTIONS=--selinux-enabled -H fd:// --insecure-registry baleia:5000
# Location used for temporary files, such as those created by
# docker load and build operations. Default is /var/lib/docker/tmp
# Can be overriden by setting the following environment variable.
# DOCKER_TMPDIR=/var/tmp
I have got to push that image on my private registry. What is wrong?
Metadata
Metadata
Assignees
Labels
No labels
Activity
donhector commentedon Mar 24, 2015
I faced a similar issue, like you I'm using my own insecure registry. Apparently "docker-compose" does not seem to enforce the "--insecure-registry" you have in the Docker daemon config file. Instead I had to explicitly tell "docker-compose" to trust your insecure registry like this:
docker-compose up --allow-insecure-registry
It also works for the "run" command, as in:
docker-compose run --allow-insecure-registry myServiceName
For more info on those commands you can do:
docker-compose up --help
docker-compose run --help
Whether "docker-compose" should by default honor the Docker daemon setting "--insecure-registry" when no "--allow-insecure-registry" is provided via compose, is something I'd like to know as well...
alunduil commentedon Mar 24, 2015
Not sure if this is related but after I login with
docker loginto quay. I'm still not shown as authenticated when usingdocker-compose up:This is received after trying to pull a private image from quay after having logged in successfully with
docker login. I have verified that I have access to the repository by successfully doing:docker pull quay.io/private/reporadekdymacz commentedon Mar 24, 2015
same here
d11wtq commentedon Mar 26, 2015
Also having issues using images in private repositories (quay.io). It seems like docker-compose isn't loading the ~/.dockercfg file and therefore getting a 403 when trying to do the pull.
Looking at the upstream docker-py client, there is code to make this work. Perhaps docker-compose's vendored version doesn't have it?
roadsideseb commentedon Apr 10, 2015
Yes, that's exactly what it is, version 1.1.0 of docker-compose is vendoring docker-py 0.7.2 which doesn't have authentication. It also enforces a version
<0.8for docker-py which means installing viapipdoesn't help.Installing the
1.2.0rc4from binary fixed the issue for me.For users of homebrew, I've just created a formula for it until
1.2.0is available on homebrew itself:guillaume-brossard commentedon Apr 14, 2015
Installing 1.2.0rc4 doesn't solve the issue for me. Also trying to pull from quay.io
alunduil commentedon Apr 14, 2015
Using docker-py-1.1.0 appears to solve this issue. Is docker-py still bundled? If so can we get it unbundled?
phlegx commentedon Apr 22, 2015
The flag
Doesn't resolve that for me. Please have a look also here where I describe my problem: #1319
brianlund commentedon Apr 29, 2015
Same problem here.
docker pull myregistry/something - works
docker-compose up - results in compose.progress_stream.StreamOutputError: Authentication is required.
Running a private registry with valid ssl certificate and basic auth.
/usr/local/bin/docker-compose --version
docker-compose 1.2.0
aanand commentedon Apr 29, 2015
Duplicate of #75
vicmosin commentedon Jul 28, 2015
Still have the same issue even in 1.4.0rc2.
Try
docker-compose uponquay.ioand receive:normal pull from the same repository works fine
sabretus commentedon Nov 10, 2015
@vicmosin did you managed to fix this ?
vicmosin commentedon Nov 10, 2015
@sabretus Nope
fabtho commentedon Apr 14, 2016
having the same error, this works for me on ubunut vivid (15.04) and docker-compose 1.2 / docker 1.9.1:
docker-compose pull --allow-insecure-sslI have this problem using docker-compose 1.2 so upgrade did the trick too..
https://github.com/docker/compose/releases