FROM jenkins/jenkins:jdk11 ## 현재 유저권한으로 USER $USER ## docker 설치 RUN curl -s https://get.docker.com/ | sh ## docker-compose 설치 RUN curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ chmod +x /usr/local/bin/docker-compose && \ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose ## dcs 툴 설치 RUN curl -sL bit.ly/ralf_dcs -o ./dcs && \ chmod 755 dcs && \ mv dcs /usr/local/bin/dcs ## docker group 에 jenkins 추가 RUN usermod -aG docker jenkins
docker build -f Dockerfile -t my-jenkis:dev .
version: '2' services: jenkins: privileged: true image: my-jenkis:dev restart: always ports: - "9080:8080" - "50010:50000" volumes: - '/jenkins_home:/var/jenkins_home' - '/var/run/docker.sock:/var/run/docker.sock' environment: TZ: "Asia/Seoul" labels: io.rancher.scheduler.affinity:host_label: server=some io.rancher.container.hostname_override: container_name io.rancher.container.pull_image: always