티스토리 뷰

Docker

Docker Jenkins Container내에 Docker 설치

카니 Kani's 2018. 9. 15. 19:59
docker run -p 8080:8080 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --name jenkins \
  jenkins/jenkins:lts


docker exec -it -u root jenkins bash


apt-get update && \
apt-get -y install apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common && \
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
   $(lsb_release -cs) \
   stable" && \
apt-get update && \
apt-get -y install docker-ce

출처 : https://getintodevops.com/blog/the-simple-way-to-run-docker-in-docker-for-ci


권한 문제가 발생할 것이다.

jenkins docker 안에서 


usermod -aG docker jenkins 


chmod 666 /var/run/docker.sock

해주자.

'Docker' 카테고리의 다른 글

docker postgresql  (0) 2019.07.04
Docker Mysql  (0) 2019.04.06
Docker에서 한글 설정  (0) 2019.01.15
Docker Jenkins Container내에 Docker 설치  (0) 2018.09.15
댓글
댓글쓰기 폼
공지사항
Total
26,926
Today
1
Yesterday
32
링크
«   2020/08   »
            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          
글 보관함