Docker setup and running a (language-specific) Travis-CI docker image:
# install docker tools (e.g. via homebrew)
brew install docker docker-machine
# create a docker machine (https://docs.docker.com/machine/)
docker-machine create --driver virtualbox default
# set up your shell session for docker
eval $(docker-machine env default)
# run one of the travis-ci worker images (https://quay.io/organization/travisci)
docker run -it quay.io/travisci/travis-ruby /bin/bash
Then follow the instructions from the travis docs.
Note: To clone a private GitHub repo, it's probably easiest to clone via HTTPS, supply your username and a GitHub personal access token as a password (assuming you enabled 2-factor-authentication).
Does this assume any specific operating system?