machine:
  services:
    - docker
  environment:
    NODE_ENV: development
    YARN_VERSION: 0.17.8
    PATH: "${PATH}:${HOME}/.yarn/bin:/usr/sbin:/sbin"
  node: 
    version: 6.9.1
dependencies:
  cache_directories:
    - ~/.yarn
    - ~/.yarn-cache
  pre:
    - yarn cache dir
    - mkdir -p ~/.yarn && cd ~/.yarn && wget https://yarnpkg.com/latest.tar.gz && tar -xf latest.tar.gz dist --strip-components=1
  override:
    - cat CircleDockerfile > Dockerfile
    - |
       docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL
       docker pull soluto/tweek-back-office
       docker build --rm=false -t soluto/tweek-back-office .
    - yarn install
test:
  override:
    - yarn test:unit
    - docker run -d -p 4000:3000 -e GIT_URL=${GIT_URL} -e GIT_PASSWORD=${GIT_PASSWORD} -e GIT_USER=${GIT_USER} soluto/tweek-back-office:latest -e TWEEK_API_HOSTNAME=${TWEEK_API_HOSTNAME}.
    - curl --retry-delay 5 --retry 20 -v http://localhost:4000/keys
    - npm run test:e2e
general:
  build_dir: BackOffice
deployment:
  hub: 
    branch: master
    commands:
      - docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL
      - docker push soluto/tweek-back-office

machine:
  services:
    - docker
  environment:
    NODE_ENV: development
    YARN_VERSION: 0.17.8
    PATH: "${PATH}:${HOME}/.yarn/bin:/usr/sbin:/sbin"
  node: 
    version: 6.9.1
dependencies:
  cache_directories:
    - ~/.yarn
    - ~/.yarn-cache
  pre:
    - yarn cache dir
    - mkdir -p ~/.yarn && cd ~/.yarn && wget https://yarnpkg.com/latest.tar.gz && tar -xf latest.tar.gz dist --strip-components=1
  override:
    - cat CircleDockerfile > Dockerfile
    - |
       docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL
       docker pull soluto/tweek-back-office
       docker build --rm=false -t soluto/tweek-back-office .
    - yarn install
test:
  override:
    - yarn test:unit
    - docker run -d -p 4000:3000 -e GIT_URL=${GIT_URL} -e GIT_PASSWORD=${GIT_PASSWORD} -e GIT_USER=${GIT_USER} -e TWEEK_API_HOSTNAME=${TWEEK_API_HOSTNAME} soluto/tweek-back-office:latest .
    - curl --retry-delay 5 --retry 20 -v http://localhost:4000/keys
    - npm run test:e2e
general:
  build_dir: BackOffice
deployment:
  hub: 
    branch: master
    commands:
      - docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL
      - docker push soluto/tweek-back-office

Fix for docker run command
Fix for docker run command
