Repository navigation
Expand file tree
/
Copy pathcompose.lab.yml
More file actions
124 lines (115 loc) · 2.79 KB
/
Copy pathcompose.lab.yml
File metadata and controls
124 lines (115 loc) · 2.79 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
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
# PatchOps Lab Stack — Aptly Mirror + Ubuntu Servers
# Usage: SSH_PUBKEY="$(cat ~/.ssh/personal.pub)" docker compose -f compose.lab.yml up -d --build
# (scripts/start.sh sets SSH_PUBKEY for you.)
# Images are built once from docker/lab-host.Dockerfile — SSH+Python3 install
# and the authorized_keys file are baked in at build time and cached, instead
# of re-running apt-get on every container boot.
x-ssh-host-build: &ssh-host-build
context: ./docker
dockerfile: lab-host.Dockerfile
args:
SSH_PUBKEY: ${SSH_PUBKEY}
services:
aptly:
build:
context: ./docker
dockerfile: lab-host.Dockerfile
args:
SSH_USER: aptly
SSH_PASS: aptly
SSH_UID: "115"
SSH_PUBKEY: ${SSH_PUBKEY}
image: patchops-aptly:latest
container_name: patchops-aptly
hostname: patchops-aptly
restart: unless-stopped
ports:
- "80:80"
- "8080:8080"
- "2200:22"
volumes:
- aptly-data:/var/cache/aptly
- aptly-gnupg:/home/aptly/.gnupg
networks:
- ansible-lab-net
ubuntu1:
build: *ssh-host-build
image: patchops-ssh-base:latest
container_name: ansible-ubuntu1
hostname: ansible-ubuntu1
restart: unless-stopped
ports:
- "2201:22"
volumes:
- ubuntu1-home:/home/ansible
- ubuntu1-data:/data
networks:
- ansible-lab-net
ubuntu2:
build: *ssh-host-build
image: patchops-ssh-base:latest
container_name: ansible-ubuntu2
hostname: ansible-ubuntu2
restart: unless-stopped
ports:
- "2202:22"
volumes:
- ubuntu2-home:/home/ansible
- ubuntu2-data:/data
networks:
- ansible-lab-net
ubuntu3:
build: *ssh-host-build
image: patchops-ssh-base:latest
container_name: ansible-ubuntu3
hostname: ansible-ubuntu3
restart: unless-stopped
ports:
- "2203:22"
volumes:
- ubuntu3-home:/home/ansible
- ubuntu3-data:/data
networks:
- ansible-lab-net
ubuntu4:
build: *ssh-host-build
image: patchops-ssh-base:latest
container_name: ansible-ubuntu4
hostname: ansible-ubuntu4
restart: unless-stopped
ports:
- "2204:22"
volumes:
- ubuntu4-home:/home/ansible
- ubuntu4-data:/data
networks:
- ansible-lab-net
ubuntu5:
build: *ssh-host-build
image: patchops-ssh-base:latest
container_name: ansible-ubuntu5
hostname: ansible-ubuntu5
restart: unless-stopped
ports:
- "2205:22"
volumes:
- ubuntu5-home:/home/ansible
- ubuntu5-data:/data
networks:
- ansible-lab-net
volumes:
aptly-data:
aptly-gnupg:
ubuntu1-home:
ubuntu1-data:
ubuntu2-home:
ubuntu2-data:
ubuntu3-home:
ubuntu3-data:
ubuntu4-home:
ubuntu4-data:
ubuntu5-home:
ubuntu5-data:
networks:
ansible-lab-net:
driver: bridge