-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (52 loc) · 1.57 KB
/
docker-compose.yml
File metadata and controls
65 lines (52 loc) · 1.57 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# version: '3.8'
services:
jenkins:
image: jenkins/jenkins:lts
container_name: jenkins_automotive
restart: unless-stopped
ports:
# Jenkins Web UI
- "8080:8080"
# Jenkins Agent port
- "50000:50000"
volumes:
# Persistent Jenkins data
- jenkins_home:/var/jenkins_home
# Mount Windows workspace to Jenkins (CRITICAL!)
# This allows Jenkins to access MATLAB files on Windows
- C:/Matlab/Matlab:/workspace
# Optional: Mount MATLAB installation (if needed)
# Adjust path to your MATLAB installation
# - C:/Program Files/MATLAB/R2025b:/matlab:ro
environment:
# Java options for Jenkins
- JAVA_OPTS=-Djenkins.install.runSetupWizard=false -Dhudson.slaves.WorkspaceList=-
# Timezone
- TZ=Asia/Bangkok
# Windows host IP (for accessing Windows from container)
- WINDOWS_HOST=host.docker.internal
# Allow Jenkins to access Windows host
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- jenkins_network
# Optional: Add Jenkins agent if needed
# jenkins-agent:
# image: jenkins/ssh-agent
# container_name: jenkins_agent
# restart: unless-stopped
# networks:
# - jenkins_network
# environment:
# - JENKINS_AGENT_SSH_PUBKEY=<your-ssh-public-key>
volumes:
jenkins_home:
driver: local
# Optional: Specify custom location
# driver_opts:
# type: none
# o: bind
# device: /opt/jenkins_home
networks:
jenkins_network:
driver: bridge