This repository was archived by the owner on Feb 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
98 lines (93 loc) · 2.23 KB
/
docker-compose.yml
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
version: "3"
services:
node1:
container_name: node1
image: yjh_rcmd_image
restart: always
stdin_open: true
tty: true
shm_size: 2G
privileged: true
environment:
- NODE_ID=1
ports:
- "31122:22" # node1 ssh
- "31100:8000" # node1 nginx
hostname: node1
networks:
yjh_rcmd_net:
ipv4_address: "${SUBNET:-172.48}.0.11"
extra_hosts:
- "node2:${SUBNET:-172.48}.0.12"
- "node3:${SUBNET:-172.48}.0.13"
- "node4:${SUBNET:-172.48}.0.14"
command: /bin/bash -c '/usr/sbin/sshd & /bin/bash'
node2:
container_name: node2
image: yjh_rcmd_image
restart: always
stdin_open: true
tty: true
shm_size: 2G
privileged: true
environment:
- NODE_ID=2
hostname: node2
networks:
yjh_rcmd_net:
ipv4_address: "${SUBNET:-172.48}.0.12"
extra_hosts:
- "node1:${SUBNET:-172.48}.0.11"
- "node3:${SUBNET:-172.48}.0.13"
- "node4:${SUBNET:-172.48}.0.14"
command: /bin/bash -c '/usr/sbin/sshd & /bin/bash'
node3:
container_name: node3
image: yjh_rcmd_image
restart: always
stdin_open: true
tty: true
shm_size: 2G
privileged: true
environment:
- NODE_ID=3
ports:
- "31870:9870" # yarn
- "31088:8088" # hdfs
hostname: node3
networks:
yjh_rcmd_net:
ipv4_address: "${SUBNET:-172.48}.0.13"
extra_hosts:
- "node1:${SUBNET:-172.48}.0.11"
- "node2:${SUBNET:-172.48}.0.12"
- "node4:${SUBNET:-172.48}.0.14"
command: /bin/bash -c '/usr/sbin/sshd -D & /bin/bash'
node4:
container_name: node4
image: yjh_rcmd_image
restart: always
stdin_open: true
tty: true
shm_size: 2G
privileged: true
environment:
- NODE_ID=4
ports:
- "31871:9870" # yarn
- "31089:8088" # hdfs
hostname: node4
networks:
yjh_rcmd_net:
ipv4_address: "${SUBNET:-172.48}.0.14"
extra_hosts:
- "node1:${SUBNET:-172.48}.0.11"
- "node2:${SUBNET:-172.48}.0.12"
- "node3:${SUBNET:-172.48}.0.13"
command: /bin/bash -c '/usr/sbin/sshd -D & /bin/bash'
networks:
yjh_rcmd_net:
name: yjh_rcmd_net
ipam:
config:
- subnet: "${SUBNET:-172.48}.0.0/16"