title: docker compose, vagrant and insecure Repository
body: <p>I have setup docker-compose to pull my image from a custom repository.</p>
  
  <p>Here is how the yaml file looks like</p>
  
  <pre><code>my_service:
    image: d-myrepo:5000/mycompany/my_service:latest
    ports:
      - "8079:8079"
  </code></pre>
  
  <p>Now if I run vagrant up, it gets errors</p>
  
  <p>==> default:   File "/code/build/docker-compose/out00-PYZ.pyz/docker.auth.auth", line 46, in expand_registry_url
  ==> default: docker.errors
  ==> default: .
  ==> default: DockerException
  ==> default: :
  ==> default: HTTPS endpoint unresponsive and insecure mode isn't enabled.
  The following SSH command responded with a non-zero exit status.
  Vagrant assumes that this means the command failed!</p>
  
  <pre><code>/usr/local/bin/docker-compose -f "/vagrant/docker-compose.yml" up -d
  
  Stdout from the command:
  
  
  
  Stderr from the command:
  
  stdin: is not a tty
  Creating vagrant_y2y_1...
  Pulling image d-myrepo:5000/mycompany/my_service:latest...
  Traceback (most recent call last):
    File "&lt;string&gt;", line 3, in &lt;module&gt;
    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.
  </code></pre>
  
  <p>I read about it on the internet, that it has to do with having an insecure repo.</p>
  
  <p>It only works, only if I edit the file</p>
  
  <pre><code>/etc/default/docker
  </code></pre>
  
  <p>with content </p>
  
  <pre><code>DOCKER_OPTS="-r=true --insecure-registry d-myrepo:5000 ${DOCKER_OPTS}"
  </code></pre>
  
  <p>restart the docker service and manually pull the image. i.e.</p>
  
  <pre><code>docker pull d-myrepo:5000/mycompany/my_service:latest
  </code></pre>
  
  <p>Is there a way to avoid this error? and having the provisioning running smoothly? maybe I am missing an option inside the <code>docker-composer.yml</code> file?</p>