build-support/travis/docker_run_image.mustache (11 lines of code) (raw):

{{! Note we mount ${HOME} to cache the ${HOME}/.cache/pants/rust-toolchain. }} docker run --rm -t -v "${HOME}:/travis/home" -v "${TRAVIS_BUILD_DIR}:/travis/workdir" {{! $docker_image_name is an environment variable with an expected value like `travis_ci`. It should be set in the env section.}} ${docker_image_name}:latest {{! $docker_run_command is an environment variable with an expected string value like `"echo 'hello' && exit 1"`. It should be set in the env section.}} sh -c "${docker_run_command}"