-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (70 loc) · 2.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (70 loc) · 2.28 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
services:
dc1:
container_name: ${DC_NAME}
hostname: ${DC_NAME}
build:
context: ./dockerfile
target: dc
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config-dc1:/etc/samba/config
- ./data-dc1:/var/lib/samba
environment:
- DOMAIN_FQDN=${DOMAIN_FQDN}
- DOMAIN_DN=${DOMAIN_DN}
- DNSFORWARDER=${MAIN_DNS_IP}
- DC_IP=${DC_IP}
dns_search:
- ${DOMAIN_FQDN}
dns:
- ${DC_IP}
- ${MAIN_DNS_IP}
extra_hosts:
- ${DC_NAME}.${DOMAIN_FQDN}:${DC_IP}
privileged: true # Run as true root. Required on a DC because the vfs_acl_xattr module is enabled automatically, which uses the security.* namespace (see https://www.samba.org/samba/docs/current/man-html/vfs_acl_xattr.8.html).
networks:
sambanet:
ipv4_address: ${DC_IP}
fs1:
container_name: ${FS_NAME}
hostname: ${FS_NAME}
build:
context: ./dockerfile
target: fs
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config-fs1/kerberos/krb5.conf:/etc/krb5.conf
- ./config-fs1/kerberos/krb5.keytab:/etc/krb5.keytab
- ./config-fs1/samba:/etc/samba/config
- ./config-fs1/supervisor:/etc/supervisor/config:ro
- ./data-fs1:/var/lib/samba
- ./shares-fs1:/srv/samba
environment:
- DOMAIN_FQDN=${DOMAIN_FQDN}
- DOMAIN_DN=${DOMAIN_DN}
- FS_NAME=${FS_NAME}
- FS_IP=${FS_IP}
dns_search:
- ${DOMAIN_FQDN}
dns:
- ${MAIN_DNS_IP}
extra_hosts:
- ${FS_NAME}.${DOMAIN_FQDN}:${FS_IP}
# privileged: true # Run as true root. Required by Samba because it uses the security.* namespace (see https://www.samba.org/samba/docs/current/man-html/vfs_acl_xattr.8.html).
networks:
sambanet:
ipv4_address: ${FS_IP}
depends_on:
- dc1
networks:
sambanet:
driver: macvlan
driver_opts:
parent: ${HOST_INTERFACE}
ipam:
config:
- subnet: "${SUBNET}" # Shared with the host
gateway: "${GATEWAY}" # Same as on the host
ip_range: "${CONTAINER_IP_RANGE}" # Tell Docker which IP addresses are available for containers