-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yaml
67 lines (61 loc) · 1.28 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
---
version: '2.1'
networks:
testnet:
driver: bridge
enable_ipv6: false
ipam:
driver: default
config:
- subnet: 192.168.254.0/24
gateway: 192.168.254.1
services:
radiusd:
image: radiusd
command: -f -l stdout
networks:
testnet:
ipv4_address: 192.168.254.254
build:
context: radiusd/
ports:
- "1812:1812/udp"
tty: true
read_only: true
cap_drop:
- all
pids_limit: 10
cpu_shares: 512
mem_limit: 100M
shm_size: 16M
radclient: &radclient
image: radclient
networks:
testnet:
build:
context: radclient/
stdin_open: true
tty: true
read_only: true
cap_drop:
- all
pids_limit: 10
cpu_shares: 512
mem_limit: 32M
shm_size: 16M
# Demonstrate yaml anchor and reference.
status:
<<: *radclient
command: -f /root/status_message 192.168.254.254:1812 status testing123
# "extends" is the docker-compose alternative to yaml anchor and reference.
auth:
extends:
service: radclient
command: -f /root/test.conf 192.168.254.254:1812 auth testing123
version:
image: radiusd
entrypoint:
- sh
command:
- -c
- "apk policy freeradius 2>/dev/null | tail -n +2 | head -1 | tr -d ' :'"