Sign inSign up

greengloves/travis

By greengloves

•Updated almost 9 years ago

Run the Travis CI command-line gem inside Docker

Image
0

198

greengloves/travis repository overview

⁠travis

The Docker image in this directory wraps the Travis CI CLI client⁠. This saves me from dealing with gem install and keeping a compatible version of Ruby installed.

⁠Usage

You always need to share the .travis directory in your user folder with the container -- this is where Travis tracks the logged in user.

You need to authenticate with GitHub when you first set up the CLI client. Like so:

$ docker run --volume ~/.travis:/root/.travis alexwlchan/travis login --github-token=<TOKEN>

where <TOKEN> is a personal access token generated on GitHub⁠ with access to your public repos.

After that, I use the following command to run the container (bound to a shell alias):

$ docker run --volume $(git rev-parse --show-toplevel):/repo --volume ~/.travis:/root/.travis alexwlchan/travis

The git command is returning the path to the root of the current repository -- I've never had a scenario where I used the Travis CLI and wasn't in a Git repo.

Tag summary

Content type

Image

Digest

Size

25.4 MB

Last updated

almost 9 years ago

docker pull greengloves/travis