title: GitLab, Can't login in Docker registry
body: <p>I am a GitLab User. I produce with a groff script a book with 900 pages. The output will be stored in the output folder. When an author make some changes and push into GitLab, the Docker image will produce this book.  </p>
  
  <p>The idea is to build a docker container and store the container in the GitLab registry. The build of the container works fine, but I get an error message.</p>
  
  <p>The error is in the run script. The docker login in not correct.</p>
  
  <pre class="lang-sh prettyprint-override"><code>image: docker:latest
  
  variables:
    DOCKER_DRIVER: overlay2
    CONTAINER_IMAGE: registry.gitlab.com/test
    DOCKER_IMAGE: paperboy
    TAG: 0.1.0
  
  services:
    - docker:dind
  
  stages:
    - build
    - release
    - run
  
  before_script:
    - docker login registry.gitlab.com --username gitlab+deploy-token-0000 --password 3435563
    - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
    - apk update &amp;&amp; apk add --no-cache
    - rm -rf /var/cache/apk/*
  
  build:
    stage: build
    script:
      - docker build -t $CONTAINER_IMAGE/$DOCKER_IMAGE .
      - docker push $CONTAINER_IMAGE/$DOCKER_IMAGE
  
  release:
    stage: release
    script:
      - docker pull $CONTAINER_IMAGE/$DOCKER_IMAGE
      - docker tag  $CONTAINER_IMAGE/$DOCKER_IMAGE:latest $CONTAINER_IMAGE/$DOCKER_IMAGE:$TAG
      - docker push $CONTAINER_IMAGE/$DOCKER_IMAGE:$TAG
    only:
      - master
  
  run:
    stage: run
    script:
      - docker pull $CONTAINER_IMAGE/$DOCKER_IMAGE
      - docker run --rm  -v $(pwd)/data/:/home/data 
      -v $(pwd)/output/:/home/output
      -v $(pwd)/output/csv/:/home/output/csv
      -v $(pwd)/output/pdf/:/home/output/pdf paperboy
      - rm -rf "%CACHE_PATH%/%CI_PIPELINE_ID%"
    only:
      - master
  </code></pre>
  
  <p>This is the idea of the run script in my .gitlab-ci.yml. I get this error message:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ docker run --rm 
    -v $(pwd)/data/:/home/data
    -v $(pwd)/output/:/home/output
    -v $(pwd)/output/csv/:/home/output/csv
    -v $(pwd)/output/pdf/:/home/output/pdf $CONTAINER_IMAGE/$DOCKER_IMAGE
  
    - git add .
  
  docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"-\": executable file not found in $PATH": unknown.
  time="2019-09-10T10:55:51Z" level=error msg="error waiting for container: context canceled"
  ERROR: Job failed: exit code 127
  </code></pre>
  
  <pre class="lang-sh prettyprint-override"><code>run:
    stage: run
    script:
      - docker login registry.gitlab.com -u gitlab+deploy-token-95492 -p $DEPLOY_TOKEN
      - docker pull $CONTAINER_IMAGE/$DOCKER_IMAGE
      - docker images | grep paperboy
      - docker run --rm
        -v $(pwd)/data/:/home/data
        -v $(pwd)/output/:/home/output
        -v $(pwd)/output/csv/:/home/output/csv
        -v $(pwd)/output/pdf/:/home/output/pdf
        $CONTAINER_IMAGE/$DOCKER_IMAGE
        - git add .
        - git commit -m "Update"
        - git push origin master
        - rm -rf "%CACHE_PATH%/%CI_PIPELINE_ID%"
    only:
      - master
  </code></pre>