-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkins software setup on docker container.txt
42 lines (28 loc) · 2.08 KB
/
Jenkins software setup on docker container.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Jenkins Installation in Docker Container:
Prerequisite : We need to have docker installed in our system and in my above earlier files I have written the steps for installing docker container on top of base redhat OS.
Step 1: Starts docker services:
# systemctl start docker
Step 2: Pull Jenkins image from docker hub using the following cmd on docker container:
# docker pull jenkins/jenkins:lts
Step 3: Now after downloading the jenkins image on docker container run the jenkins image
# docker run --detach --publish 8081:8181 --volume jenkins_home:/var/jenkins_home -name jenkins jenkins/jenkins:lts
Step 4 : Open our firefox browser and type:
http://localhost:8080/
Step 5: when we run this command "http://localhost:8080/" they ask for initial password so in docker we can get the password using trick :
Go to terminal and copy and paste the command that is written here on the browser page
# docker exec jenkins cat/var/jenkins_home/secrets/initialAdminPassword
output - ce202e2fca554df4bae6d50da6022106
Now press continue and set up your Jenkins Dashboard
Note: after log in into jenkins dashboard we can change our password by going into the
manage jenkins ---> manage users ---> settings button --> change password and then confirm it by saving and apply the changes.
Now to see the jenkins browser same on windows as on linux OS:
Step1: Go to settings ---> network ---> change network mode from NAT to BRIDGE ADAPTER
Then reconnect once again in virtual machine network
Step 2:
in linux cmd line type
# ifconfig enp0s3
select the ip of the network and copy it and paste it on your windows site
In windows type :
http://"ipofredhatbaseOS":8080
Note : Here to achieve this you should connect from mobile phone hotspot or from wireless router modem wifi modem only to achieve this.
Any wired modem if LAN ethernet connection is there then this site view of jenkins from linux to windows browser wont be possible as wired modem do not show the ip address of the private network and hide them from the public who want to access from outside world.