build:
  image: $ACR_URL/docker:dind
  stage: build
  services:
    - docker:dind

  tags:
    - docker
  script:
    - docker login -u $ACR_USERNAME -p $ACR_PASSWORD $ACR_URL
    - docker image build --build-arg REG=https://artifact.tecnalia.dev/artifactory/api/npm/digicon-npm-dev/ --build-arg NPM_TKN=$NPM_TOKEN --build-arg US=$ACR_USERNAME  --build-arg CI_TOKEN=$ACR_PASSWORD -t $CONTAINER_IMAGE ./
    - docker push $CONTAINER_IMAGE
  only:
    - master  
    - main
