Just run this command. It will download 3GB of the docker travis image. Then you can run commands inside the travis-ci container:
docker run --name travis -it -u travis travisci/ci-garnet:packer-1515445631-7dfb2e1 /bin/bash -l
To know which images exists, please check docker hub: https://hub.docker.com/r/travisci/ci-garnet/tags/
Check also this doc: https://github.com/habitat-sh/habitat/wiki/Testing-travis-CI-workflows-locally-in-docker