docker-compose.yml
version: '3'
services:
jenkins:
image: jenkins:2.60.3
container_name: jenkins
# uncomment for docker in docker
# run http://localhost:8080/restart (An error occurred during installation: No such plugin: cloudbees-folder)
privileged: true
user: root
volumes:
# enable persistent volume (warning: make sure that the local jenkins_home folder is created)
- ./jenkins_home:/var/jenkins_home
# mount docker sock and binary for docker in docker (only works on linux)
- ./var/run/docker.sock:/var/run/docker.sock
- ./usr/bin/docker:/usr/bin/docker
ports:
- 8113:8080
Файл располагается в корневом каталоге.
Выполнить сборку контейнера и запустить можно при помощи команды:
docker-compose up --build -d