machine:
  services:
    - docker
dependencies:
  cache_directories:
    - "~/docker"
  pre:
    - if [[ -e ~/docker/hubot.tar ]]; then docker load --input ~/docker/hubot.tar; fi
    - docker build -t hubot .
    - mkdir -p ~/docker
    - docker save hubot > ~/docker/hubot.tar
test:
  override:
    - docker run -v "$(pwd)":/hubot hubot

machine:
  services:
    - docker
dependencies:
  cache_directories:
    - "~/docker"
  pre:
    - if [[ -e ~/docker/hubot.tar ]]; then docker load --input ~/docker/hubot.tar; fi
    - docker build -t hubot .
    - mkdir -p ~/docker
    - docker save hubot > ~/docker/hubot.tar
test:
  override:
    - docker run -p 9999:9999 -v "$(pwd)":/hubot hubot

Add -p option to test command.
Add -p option to test command.
