-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaven-dind.yaml
52 lines (52 loc) · 1.29 KB
/
maven-dind.yaml
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
spec:
volumes:
- name: docker-daemon
emptyDir: {}
- name: jenkins-docker-cfg-volume
secret:
secretName: jenkins-docker-cfg
containers:
# Override Docker config in Maven to use DinD
- name: maven
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
volumeMounts:
- mountPath: /var/lib/docker
name: docker-daemon
# Create sidecar container with DinD to build docker images
- name: dind
image: docker:18.06.1-dind
imagePullPolicy: IfNotPresent
args:
- --registry-mirror=https://mirror.gcr.io
- --insecure-registry=10.7.251.133:5000
workingDir: /home/jenkins
securityContext:
privileged: true
tty: true
env:
- name: DOCKER_CONFIG
value: /home/jenkins/.docker/
- name: DOCKER_HOST
value: tcp://localhost:2375
- name: DOCKER_REGISTRY
valueFrom:
configMapKeyRef:
name: jenkins-x-docker-registry
key: docker.registry
resources:
requests:
cpu: 512m
memory: 1024Mi
limits:
cpu: 1
memory: 2048Mi
volumeMounts:
- mountPath: /home/jenkins
name: workspace-volume
- mountPath: /var/lib/docker
name: docker-daemon
- mountPath: /home/jenkins/.docker
name: jenkins-docker-cfg-volume
readOnly: true