You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Jenkins Continuous Integration and Delivery server.
3
+
The Jenkins Continuous Integration and Delivery server.
4
4
5
5
This is a fully functional Jenkins server, based on the Long Term Support release
6
6
http://jenkins-ci.org/
@@ -15,29 +15,36 @@ http://jenkins-ci.org/
15
15
docker run -p 8080:8080 jenkins
16
16
```
17
17
18
-
This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration. You will probably want to make that a persistent volume (recommended):
18
+
This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration.
19
+
You will probably want to make that a persistent volume (recommended):
19
20
20
21
```
21
-
docker run --name myjenkins -p 8080:8080 -v /your/home:/var/jenkins_home jenkins
22
+
docker run -p 8080:8080 -v /your/home:/var/jenkins_home jenkins
22
23
```
23
24
24
-
The volume for the "myjenkins" named container will then be persistent.
25
+
This will store the jenkins data in /your/home on the host.
26
+
Ensure that /your/home is accessible by the jenkins user in container (jenkins user - uid 102 normally - or use -u root).
25
27
26
-
You can also bind mount in a volume from the host:
27
28
28
-
First, ensure that /your/home is accessible by the jenkins user in container (jenkins user - uid 102 normally - or use -u root), then:
29
+
You can also use a volume container:
29
30
30
31
```
31
-
docker run -p 8080:8080 -v /your/home:/var/jenkins_home jenkins
32
+
docker run --name myjenkins -p 8080:8080 -v /var/jenkins_home jenkins
32
33
```
33
34
35
+
Then myjenkins container has the volume (please do read about docker volume handling to find out more).
36
+
34
37
## Backing up data
35
38
36
-
If you bind mount in a volume - you can simply back up that directory (which is jenkins_home) at any time. This is highly recommended. Treat the jenkins_home directory as you would a database - in Docker you would generally put a database on a volume.
39
+
If you bind mount in a volume - you can simply back up that directory
40
+
(which is jenkins_home) at any time.
41
+
42
+
This is highly recommended. Treat the jenkins_home directory as you would a database - in Docker you would generally put a database on a volume.
37
43
38
-
If your volume is inside a container - you can use ```docker cp $ID:/var/jenkins_home``` command to extract the data.
44
+
If your volume is inside a container - you can use ```docker cp $ID:/var/jenkins_home``` command to extract the data.
45
+
Note that some symlinks on some OSes may be converted to copies (this can confuse jenkins with lastStableBuild links etc)
39
46
40
-
# Attaching build executors
47
+
# Attaching build executors
41
48
42
49
You can run builds on the master (out of the box) buf if you want to attach build slave servers: make sure you map the port: ```-p 50000:50000``` - which will be used when you connect a slave agent.
43
50
@@ -46,7 +53,10 @@ You can run builds on the master (out of the box) buf if you want to attach buil
46
53
47
54
# Upgrading
48
55
49
-
All the data needed is in the /var/jenkins_home directory - so depending on how you manage that - depends on how you upgrade. Generally - you can copy it out - and then "docker pull" the image again - and you will have the latest LTS - you can then start up with -v pointing to that data (/var/jenkins_home) and everything will be as you left it.
56
+
All the data needed is in the /var/jenkins_home directory - so depending on how you manage that - depends on how you upgrade. Generally - you can copy it out - and then "docker pull" the image again - and you will have the latest LTS - you can then start up with -v pointing to that data (/var/jenkins_home) and everything will be as you left it.
50
57
58
+
As always - please ensure that you know how to drive docker - especially volume handling!
51
59
60
+
# Questions?
52
61
62
+
Jump on irc.freenode.net and the #jenkins room. Ask!
0 commit comments