machine:
  java:
    version: oraclejdk8
  services:
    - docker
deployment:
  master:
    branch: master
    commands:
      - mvn package
      - docker build -f ./Dockerfile.run -t dmitriid/tetrad .
      - docker login registry.dmitriid.com -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD
      - docker push dmitriid/tetrad

machine:
  java:
    version: oraclejdk8
  services:
    - docker
deployment:
  master:
    branch: master
    commands:
      - mvn package
      - docker build -f ./Dockerfile.run -t dmitriid/tetrad .
      - docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD registry.dmitriid.com
      - docker push dmitriid/tetrad

Correct order of arguments to login to registry
Correct order of arguments to login to registry
