| Michael Neale | 2dedbdb | 2014-07-09 16:58:10 +1000 | [diff] [blame] | 1 | # This is a WIP |
| 2 | |
| Michael Neale | 71eb3ab | 2014-07-09 18:04:01 +1000 | [diff] [blame] | 3 | Will likely form the basis of the official jenkins-ci image. Still working on it. |
| 4 | |
| 5 | To run: |
| 6 | |
| 7 | ``` |
| Michael Neale | 709841c | 2014-07-14 12:16:58 +1000 | [diff] [blame^] | 8 | docker run -p 8080:8080 jenkins |
| Michael Neale | 71eb3ab | 2014-07-09 18:04:01 +1000 | [diff] [blame] | 9 | ``` |
| 10 | |
| 11 | To use a persistent volume |
| 12 | |
| 13 | ``` |
| Michael Neale | 709841c | 2014-07-14 12:16:58 +1000 | [diff] [blame^] | 14 | docker run --name myjenkins -p 8080:8080 -v /var/jenkins_home jenkins |
| Michael Neale | 71eb3ab | 2014-07-09 18:04:01 +1000 | [diff] [blame] | 15 | ``` |
| 16 | |
| Michael Neale | 709841c | 2014-07-14 12:16:58 +1000 | [diff] [blame^] | 17 | The volume for the "myjenkins" named container will then be persistent. |
| 18 | |
| 19 | You can also bind mount in a volume from the host: |
| 20 | |
| 21 | |
| 22 | First, ensure that /your/home is accessible by the jenkins user in container (jenkins user - uid 102 normally - or use -u root), then: |
| Michael Neale | 71eb3ab | 2014-07-09 18:04:01 +1000 | [diff] [blame] | 23 | |
| 24 | ``` |
| Michael Neale | 709841c | 2014-07-14 12:16:58 +1000 | [diff] [blame^] | 25 | docker run -p 8080:8080 -v /your/home:/var/jenkins_home jenkins |
| Michael Neale | 71eb3ab | 2014-07-09 18:04:01 +1000 | [diff] [blame] | 26 | ``` |
| 27 | |
| Michael Neale | 709841c | 2014-07-14 12:16:58 +1000 | [diff] [blame^] | 28 | |
| 29 | |