Skip to content

Commit

Permalink
Merge pull request #22 from joon6093/main
Browse files Browse the repository at this point in the history
fix : Jenkins에서 Docker in Docker 문제 해결
  • Loading branch information
joon6093 authored Jun 27, 2024
2 parents ccdedfb + ba3f257 commit 769da60
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
18 changes: 18 additions & 0 deletions batch/docker-compose-jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM jenkins/jenkins:lts-jdk17

USER root

RUN apt-get update && \
apt-get -y install apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common && \
curl -fsSL get.docker.com -o get-docker.sh && \
sh get-docker.sh && \
rm get-docker.sh

RUN groupadd -f docker
RUN usermod -aG docker jenkins

USER jenkins
7 changes: 5 additions & 2 deletions batch/docker-compose-jenkins/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ version: '3.8'

services:
jenkins:
image: jenkins/jenkins:lts-jdk17
build:
context: .
dockerfile: Dockerfile
container_name: jenkins
environment:
- TZ=Asia/Seoul
user: root
privileged: true
ports:
- "8080:8080"
- "9090:8080"
- "50000:50000"
volumes:
- ./jenkins/jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
hostname: jenkins

volumes:
Expand Down

0 comments on commit 769da60

Please sign in to comment.