๐Ÿค ์€์ง€log ๐Ÿค

[CI/CD study] - 6. Docker ์— Jenkins ์„ค์น˜ํ•˜๊ธฐ ๋ณธ๋ฌธ

๐Ÿ’š DevOps

[CI/CD study] - 6. Docker ์— Jenkins ์„ค์น˜ํ•˜๊ธฐ

Eun_zii 2022. 10. 4. 13:22

 

 

[CI/CD study] - 5. Docker ์„ค์น˜

[CI/CD study] - 4. EC2 ์ธ์Šคํ„ด์Šค Image ๋งŒ๋“ค๊ธฐ [CI/CD study] - 3. AWS EC2 ์ธ์Šคํ„ด์Šค JAVA์„ค์น˜ [CI/CD study] - 2. SSH Client Tool์„ ์ด์šฉํ•ด EC2 ์ธ์Šคํ„ด์Šค ์ ‘์† [CI/CD study] - 1. AWS EC2 ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ AWS..

eun-jii.tistory.com

 

 

 

โŒจ๏ธ docker run -itd --name jenkins -p 8085:8080 jenkins/jenkins:lts

* Docker์— Jenkins๋ฅผ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ ์„ค์น˜ํ•˜๊ณ  ์ปจํ…Œ์ด๋„ˆ๋กœ ์‹คํ–‰

 

 

โŒจ๏ธ docker ps

* Jenkins๊ฐ€ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธ

 

 

์•„๊นŒ ํฌํŠธํฌ์›Œ๋”ฉ ์„ค์ •ํ–ˆ๋˜ 8085ํฌํŠธ๋ฅผ ์™ธ๋ถ€์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์ธ๋ฐ”์šด๋“œ ๊ทœ์น™์„ ์ถ”๊ฐ€

* ๋ณด์•ˆ โžก ๋ณด์•ˆ๊ทธ๋ฃน ๋ฐ‘ sg-04ab805... ํด๋ฆญ โžก ์ธ๋ฐ”์šด๋“œ ๊ทœ์น™ โžก ์ธ๋ฐ”์šด๋“œ ๊ทœ์น™ ํŽธ์ง‘ โžก  ๊ทœ์น™ ์ถ”๊ฐ€

 

 

์ธ์Šคํ„ด์Šค ํŽ˜์ด์ง€๋กœ ๋“ค์–ด๊ฐ€์„œ ํผ๋ธ”๋ฆญ IPv4 ์ฃผ์†Œ๋ฅผ ๊ฐ€์ ธ์™€์„œ, http://ip:8085/ ๋กœ ์ ‘์†ํ•ฉ๋‹ˆ๋‹ค.

* http://๋‚ด ๋„์ปค ํผ๋ธ”๋ฆญIPv4์ฃผ์†Œ:8085/

 

 

Jenkins์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•˜๋ผ๊ณ  ๋‚˜์˜ค๋Š”๋ฐ, ํŒจ์Šค์›Œ๋“œ๋Š” ์  ํ‚จ์Šค ์ปจํ…Œ์ด๋„ˆ์˜ ๊ฒฝ๋กœ์— ์žˆ์Œ

* exec ๋ช…๋ น์–ด๋กœ ํ„ฐ๋ฏธ๋„์—์„œ ์‹คํ–‰์ค‘์ธ ์  ํ‚จ์Šค ์ปจํ…Œ์ด๋„ˆ์— ์ ‘๊ทผํ•ด์„œ ์–ด๋“œ๋ฏผ ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ฐพ๊ธฐ

 

โŒจ๏ธ # docker exec -it jenkins /bin/bash

 

โŒจ๏ธ cat /var/jenkins_home/secrets/initialAdminPassword

 

 

ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜

 

 

 

ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์„ค์น˜๋˜๊ณ  ์–ด๋“œ๋ฏผ ๊ณ„์ • ๋งŒ๋“ค๊ธฐ

 

 

Jenkins ์ ‘์† ์™„๋ฃŒ โญ๏ธ

 

โŒจ๏ธ docker start jenkins

* Jenkins ์‹คํ–‰์‹œ ์ž…๋ ฅ

 

โŒจ๏ธ docker ps

* Jenkins๊ฐ€ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธ

 

 

 

โค๏ธ ๋„์›€์ฃผ์‹ ๋ถ„ : 

https://code00.tistory.com/

728x90