Step 1: Prepare Synology
The first thing to do is to enable SSH login on Diskstation. To do this, go to the “Control Panel” > “Terminal
After that you can log in via “SSH”, the specified port and the administrator password (Windows users take Putty or WinSCP).
I log in via Terminal, winSCP or Putty and leave this console open for later.
Step 2: Prepare Docker folder
I create a new directory called “jenkins” in the Docker directory.
Then I change to the new directory and create a new folder “data”:
$ sudo mkdir data
version: '2.0'
services:
jenkins:
restart: always
image: jenkins/jenkins:lts
privileged: true
user: root
ports:
- 8081:8080
container_name: jenkins
volumes:
- ./data:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/local/bin/docker:/usr/local/bin/docker
Step 3: Start
I can also make good use of the console in this step. I start the Jenkins server via Docker Compose.
$ sudo docker-compose -f jenkins.yml up -d
Step 4: Setup
Again, I use the console to read the initial password:
$ cat data/secrets/initialAdminPassword
I have selected the “Recommended installation”.
Step 5: My first job
I log in and create my Docker job.
As you can see, everything works great!