This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaven-dind.yaml
58 lines (58 loc) · 1.51 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
53
54
55
56
57
58
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_REGISTRY
valueFrom:
configMapKeyRef:
name: jenkins-x-docker-registry
key: docker.registry
- 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=http://jenkins-x-docker-registry:5000
- --registry-mirror=https://mirror.gcr.io
- --insecure-registry=http://jenkins-x-docker-registry: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: 600m
memory: 1024Mi
limits:
cpu: 2
memory: 4096Mi
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