forked from srsran/srsRAN_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
160 lines (152 loc) · 4.5 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
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
158
159
160
#
# Copyright 2021-2025 Software Radio Systems Limited
#
# This file is part of srsRAN
#
# srsRAN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsRAN is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
services:
5gc:
container_name: open5gs_5gc
build:
context: open5gs
target: open5gs
args:
OS_VERSION: "22.04"
OPEN5GS_VERSION: "v2.7.0"
env_file:
- ${OPEN_5GS_ENV_FILE:-open5gs/open5gs.env}
privileged: true
ports:
- "9999:9999/tcp"
# Uncomment port to use the 5gc from outside the docker network
# - "38412:38412/sctp"
# - "2152:2152/udp"
command: 5gc -c open5gs-5gc.yml
healthcheck:
test: [ "CMD-SHELL", "nc -z 127.0.0.20 7777" ]
interval: 3s
timeout: 1s
retries: 60
networks:
ran:
ipv4_address: ${OPEN5GS_IP:-10.53.1.2}
gnb:
container_name: srsran_gnb
# Build info
image: srsran/gnb
build:
context: ..
dockerfile: docker/Dockerfile
args:
OS_VERSION: "24.04"
# privileged mode is requred only for accessing usb devices
privileged: true
# Extra capabilities always required
cap_add:
- SYS_NICE
- CAP_SYS_PTRACE
volumes:
# Access USB to use some SDRs
- /dev/bus/usb/:/dev/bus/usb/
# Sharing images between the host and the pod.
# It's also possible to download the images inside the pod
- /usr/share/uhd/images:/usr/share/uhd/images
# Save logs and more into gnb-storage
- gnb-storage:/tmp
# It creates a file/folder into /config_name inside the container
# Its content would be the value of the file used to create the config
configs:
- gnb_config.yml
# Customize your desired network mode.
# current netowrk configuration creastes a private netwoek with both containers attached
# An alterantive would be `network: host"`. That would expose your host network into the container. It's the easiest to use if the 5gc is not in your PC
networks:
ran:
ipv4_address: ${GNB_IP:-10.53.1.3}
metrics:
ipv4_address: 172.19.1.3
# Start GNB container after 5gc is up and running
depends_on:
5gc:
condition: service_healthy
# Command to run into the final container
command: gnb -c /gnb_config.yml amf --addr ${OPEN5GS_IP:-10.53.1.2} --bind_addr ${GNB_IP:-10.53.1.3}
metrics-server:
container_name: metrics_server
image: srsran/metrics_server
build:
context: metrics_server
environment:
- PORT=${METRICS_SERVER_PORT}
- BUCKET=${DOCKER_INFLUXDB_INIT_BUCKET}
- TESTBED=default
- URL=http://${DOCKER_INFLUXDB_INIT_HOST}:${DOCKER_INFLUXDB_INIT_PORT}
- ORG=${DOCKER_INFLUXDB_INIT_ORG}
- TOKEN=${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}
ports:
- 55555:${METRICS_SERVER_PORT}/udp
networks:
metrics:
ipv4_address: 172.19.1.4
influxdb:
container_name: influxdb
image: influxdb:${DOCKER_INFLUXDB_VERSION}
volumes:
- influxdb-storage:/var/lib/influxdb2:rw
env_file:
- .env
restart: on-failure:10
# Uncomment port section to access InfluxDB from outside the docker network
# ports:
# - 8086:${DOCKER_INFLUXDB_INIT_PORT}
networks:
metrics:
ipv4_address: 172.19.1.5
grafana:
container_name: grafana
image: srsran/grafana
build:
context: grafana
volumes:
- grafana-storage:/var/lib/grafana:rw
env_file:
- .env
depends_on:
- influxdb
- metrics-server
ports:
- 3300:${GRAFANA_PORT}
networks:
metrics:
ipv4_address: 172.19.1.6
configs:
gnb_config.yml:
file: ${GNB_CONFIG_PATH:-../configs/gnb_rf_b200_tdd_n78_20mhz.yml} # Path to your desired config file
volumes:
gnb-storage:
grafana-storage:
influxdb-storage:
networks:
ran:
ipam:
driver: default
config:
- subnet: 10.53.1.0/24
metrics:
ipam:
driver: default
config:
- subnet: 172.19.1.0/24