# mkdir -p /share/docker/jenkins
# docker run -d -p 8080:8080 -v /share/docker/jenkins:/var/jenkins_home --name jenkins -u root jenkins
------ update 2018-02-26 ------
** error : I got an error. when I installed jdk 1.7 on Jenkins on the virtualBox SharedFolder(/share/).
# mkdir -p /docker/jenkins
# docker run -d -p 8080:8080 -v /docker/jenkins:/var/jenkins_home --name jenkins -u root jenkins
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c78da9c5ae57 jenkins "/bin/tini -- /usr/l…" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp, 50000/tcp jenkins
a95a445b29c8 garethflowers/svn-server "/usr/bin/svnserve -…" 14 hours ago Up 4 minutes (healthy) 0.0.0.0:3690->3690/tcp svn-server
Access jenkins page through browser and you need initial password
# docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword
a5a62c8d573c4a5682993f0820680349
2-2.Optional
I want jenkins' workspace to be on the virtualBox SharedFolder
Make new virtualBox SharedFolder in setting.
Mount jenkins-workspace
# sudo mount -t vboxsf jenkins_workspace /docker/jenkins/workspace/
댓글 없음:
댓글 쓰기