title: unable to link gitlab services to own container in .gitlab-ci.yml
body: <p>I have a simple .gitlab-ci.yml file:</p>
  
  <pre><code>image: docker:latest
  
  services:
    - docker:dind
    - postgres:9.5
  
  stages:
  - build
  - test
  
  variables:
    STAGING_REGISTRY: "dhub.example.com"
    CONTAINER_TEST_IMAGE: ${STAGING_REGISTRY}/${CI_PROJECT_NAME}:latest
  
  
  before_script:
    - docker login -u gitlab-ci -p $DHUB_PASSWORD $STAGING_REGISTRY
  
  build:
    stage: build
    script:
      - docker build --pull -t $CONTAINER_TEST_IMAGE -f Dockerfile-dev .
      - docker push $CONTAINER_TEST_IMAGE
  
  test:
    stage: test
    script:
      - docker run --env-file=.environment --link=postgres:db $CONTAINER_TEST_IMAGE nosetests
  </code></pre>
  
  <p>Everything works fine until the actual test stage. In test I'm unable to access my postgres service.
  <code>docker: Error response from daemon: Could not get container for postgres.</code></p>
  
  <p>I tried to write test like this:</p>
  
  <pre><code>test1:
    stage: test
    image: $CONTAINER_TEST_IMAGE
    services:
      - postgres:9.5
    script:
      - python manage.py test
  </code></pre>
  
  <p>But in this case, I'm unable to pull this image, because of authentication:</p>
  
  <p><code>ERROR: Preparation failed: unauthorized: authentication required</code></p>
  
  <p>Am I missing something?</p>