[code]
$ apt-get install docker (Ubuntu)
$ yum install docker (RHEL/CENTOS)
[/code]
[code]$ docker pull jenkins [/code]
Step 3: Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the container is mapped to jenkins/ directory from the current path on the host. Jenkins 8080 port is also exposed to the host as 49001.
Mapping port 8080 on the host to the container (the web ui), port 50000 to port 50000 (for build agents). Run with `-p 50000:50000` so you can connect JNLP slaves. For port 50000. This is to handle connections from JNLP based build slaves. This will store the workspace in /var/jenkins_home. All Jenkins data lives in there including plugins and configuration.
[code]$ docker run -d -p 8080:8080 -p 50000:50000 jenkins [/code]
[code]$ docker run -d -p 8080:8080 -p 50000:50000 -u root -v $PWD/jenkins:/var/jenkins_home jenkins [/code]
[code]docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins -u root [/code]
[code]
$ mkdir jenkins
$ chown 1000 jenkins
$ docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
[/code]
[code]$ docker exec name tail -f /var/log/jenkins/jenkins.log
Where name = –name [/code]
- How to Choose Wireless Access Points for Office - December 13, 2024
- Online Real Estate Courses: Navigating the Shift to Digital Education - December 13, 2024
- From Concept to Implementation: IoT Services Redefining Modern Solutions - December 13, 2024