Post

Docker를 이용하여 Jenkins 설치

1. Jenkins Docker images 다운로드

jenkins-docker-images

1
[root@localhost ~]# docker pull jenkins/jenkins

2. pull 이미지 확인

1
[root@localhost ~]# docker images

3. Jenkins Images 실행

1
[root@localhost ~]# docker run --name jenkins -p 9080:8080 -p 50000:50000 -v /var/jenkins_home jenkins:latest

4. Jenkins 로그 확인

1
[root@localhost ~]# docker logs jenkins

5. 접속

  • http://127.0.0.1:9080

6. Permission denied 오류

  • 에러 메시지
1
2
touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
  • 해결 방법
1
[root@localhost /]# chown -R 1000:1000 /var/jenkins_home/

[출처 및 참고]

This post is licensed under CC BY 4.0 by the author.