title: Pushing Docker image from gitlab-ci to Azure Container Registry
body: <p>I am familiar with docker in docker (dind) but using along with <code>microsoft/azure-cli</code> image throw <code>docker command not found</code>.</p>
  
  <p>Here is my setup for <code>gitlab-ci.yml</code> file. I have created <code>Service Principal</code> which is used to authenticate to azure cloud and respective resource group. </p>
  
  <pre><code>image: docker:latest
  
  variables:
    PASSWORD: *********
    TENANT_ID: *****-************-*************
    APP_ID: *********-*****-*****
    CLIENT_ID: ****************
    ACR_ID: *******************
  
  
  stages:
    - build
    - deploy
  
  services:
    - docker:dind
  
  before_script:
    - docker info
  
  build_staging_image:
    stage: build
    image: microsoft/azure-cli
    script:
      - az login --service-principal --username $APP_ID --password $PASSWORD --tenant $TENANT_ID
      - docker build -t azure-vote:latest ./azure-vote
      - docker tag azure-vote votingtestapp.azurecr.io/azure-vote:latest
      - docker push votingtestapp.azurecr.io/azure-vote:latest
  
  
  
  deploy:develop:
    stage: deploy
    script:
      - az login --service-principal --username $APP_ID --password $PASSWORD --tenant $TENANT_ID
      - az acr login --name votingTestApp
      - az role assignment create --assignee $CLIENT_ID --role Reader --scope $ACR_ID
      - kubectl apply -f azure-vote-all-in-one-redis.yaml
    only:
      - develop
  </code></pre>
  
  <p>Any way to fix this error. I am just trying to create CI/CD pipeline. </p>