forked from spurin/diveintoansible-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
157 lines (147 loc) · 3.69 KB
/
docker-compose.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: '3.8' # if no version is specificed then v1 is assumed. Recommend v2 minimum
services:
ubuntu-c:
hostname: ubuntu-c
container_name: ubuntu-c
image: spurin/diveintoansible:ansible
ports:
- ${UBUNTUC_PORT_SSHD}:22
- ${UBUNTUC_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/ubuntu-c/ansible:/home/ansible
- ${ANSIBLE_HOME}/ubuntu-c/root:/root
networks:
- diveinto.io
ubuntu1:
hostname: ubuntu1
container_name: ubuntu1
image: spurin/diveintoansible:ubuntu
ports:
- ${UBUNTU1_PORT_SSHD}:22
- ${UBUNTU1_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/ubuntu1/ansible:/home/ansible
- ${ANSIBLE_HOME}/ubuntu1/root:/root
networks:
- diveinto.io
ubuntu2:
hostname: ubuntu2
container_name: ubuntu2
image: spurin/diveintoansible:ubuntu
ports:
- ${UBUNTU2_PORT_SSHD}:22
- ${UBUNTU2_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/ubuntu2/ansible:/home/ansible
- ${ANSIBLE_HOME}/ubuntu2/root:/root
networks:
- diveinto.io
ubuntu3:
hostname: ubuntu3
container_name: ubuntu3
image: spurin/diveintoansible:ubuntu
ports:
- ${UBUNTU3_PORT_SSHD}:22
- ${UBUNTU3_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/ubuntu3/ansible:/home/ansible
- ${ANSIBLE_HOME}/ubuntu3/root:/root
networks:
- diveinto.io
centos1:
hostname: centos1
container_name: centos1
image: spurin/diveintoansible:centos
#image: spurin/diveintoansible:centos-sshd-2222
ports:
- ${CENTOS1_PORT_SSHD}:22
#- ${CENTOS1_PORT_SSHD}:2222
- ${CENTOS1_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/centos1/ansible:/home/ansible
- ${ANSIBLE_HOME}/centos1/root:/root
networks:
- diveinto.io
centos2:
hostname: centos2
container_name: centos2
image: spurin/diveintoansible:centos
ports:
- ${CENTOS2_PORT_SSHD}:22
- ${CENTOS2_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/centos2/ansible:/home/ansible
- ${ANSIBLE_HOME}/centos2/root:/root
networks:
- diveinto.io
centos3:
hostname: centos3
container_name: centos3
image: spurin/diveintoansible:centos
ports:
- ${CENTOS3_PORT_SSHD}:22
- ${CENTOS3_PORT_TTYD}:7681
privileged: true
volumes:
- ${CONFIG}:/config
- ${ANSIBLE_HOME}/shared:/shared
- ${ANSIBLE_HOME}/centos3/ansible:/home/ansible
- ${ANSIBLE_HOME}/centos3/root:/root
networks:
- diveinto.io
# Docker in Docker
#
# Usage: on host that wishes to use docker
#
# sudo apt-get update
# sudo apt -y install docker.io
# export DOCKER_HOST=tcp://docker:2375
# docker ps -a
#
docker:
hostname: docker
container_name: docker
image: spurin/diveintoansible:dind
privileged: yes
volumes:
- ${ANSIBLE_HOME}/shared:/shared
networks:
- diveinto.io
portal:
hostname: portal
container_name: portal
image: spurin/diveintoansible:portal
environment:
- NGINX_ENTRYPOINT_QUIET_LOGS=1
depends_on:
- centos1
- centos2
- centos3
- ubuntu1
- ubuntu2
- ubuntu3
ports:
- "1000:80"
networks:
- diveinto.io
networks:
diveinto.io:
name: diveinto.io