Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build & deploy with jenkins #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dana096
Copy link
Owner

@dana096 dana096 commented Feb 27, 2024

image

@dana096 dana096 self-assigned this Feb 27, 2024
@dana096
Copy link
Owner Author

dana096 commented Feb 27, 2024

[step 1] jenkins 실행

$ pwd
/home/dana096/app/jenkins
$ java -jar jenkins.war --httpPort=9090

@dana096
Copy link
Owner Author

dana096 commented Feb 27, 2024

[step 2] jenkins에서 새로운 item “docker-jenkins” 생성

image

@dana096
Copy link
Owner Author

dana096 commented Feb 27, 2024

[step 3] jenkins 구성 → build step

image
image
push에 실패했다면, docker login이 되어있는지 확인하기 (터미널에서 docker login하면 push 가능!!)
image

@dana096
Copy link
Owner Author

dana096 commented Feb 27, 2024

[step 4] jenkins build

image
image
image

@dana096
Copy link
Owner Author

dana096 commented Feb 27, 2024

[step 5] TEST

1) 도커허브에 lb / serv-a / serv-b 이미지 생성 확인

image

2) 링크 접속 확인

화면 캡처 2024-02-27 114452
화면 캡처 2024-02-27 114431

3) curl 확인

curl http://localhost:8001/
<h1>Hello Dockerfie A!</h1>
<h1>docker build & deploy with jenkins</h1>

curl http://localhost:8001/blog/
<h1>Hello Dockerfile B</h1>
<h1>docker build & deploy with jenkins</h1>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant