Skip to content

Commit 0245ca6

Browse files
committed
Tweaking the container based docker topic
1 parent 5e70880 commit 0245ca6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

user/common-build-problems.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -300,21 +300,26 @@ We recommend careful use of `travis_wait`, as overusing it can extend your build
300300

301301
## Troubleshooting Locally in a Docker Image
302302

303-
If you're having trouble tracking down the exact problem in a build it often helps to run the build locally. To do this you need to be using our container based infrastructure, and to download the same Docker image you are using on Travis CI.
303+
If you're having trouble tracking down the exact problem in a build it often helps to run the build locally. To do this you need to be using our container based infrastructure (ie, have `sudo: false` in your `.travis.yml`), and to know which Docker image you are using on Travis CI.
304304

305305
### Running a Container Based Docker Image Locally
306306

307307
1. Download and install the Docker Engine:
308308
* [Windows](https://docs.docker.com/installation/windows)
309309
* [OS X](https://docs.docker.com/installation/mac)
310310
* [Ubuntu Linux](https://docs.docker.com/installation/ubuntulinux/)
311-
2. Select an image from [Quay.io](https://quay.io/organization/travisci). If you're not using a language specific image pick `travis-ruby`. Open a terminal and run an interactive Docker session using the image URL:
311+
2. Select an image from [Quay.io](https://quay.io/organization/travisci). If you're not using a language-specific image pick `travis-ruby`. Open a terminal and start an interactive Docker session using the image URL:
312312

313313
```bash
314314
docker run -it quay.io/travisci/travis-ruby /bin/bash
315-
su - travis
315+
```
316+
317+
3. Switch to the `travis` user:
318+
319+
```bash
320+
su - travis
316321
```
317322

318323
3. Clone your git repository into the `/` folder of the image.
319-
4. Manually install any dependencies such as `rake` and your gems.
324+
4. Manually install any dependencies.
320325
5. Manually run your Travis CI build command.

0 commit comments

Comments
 (0)