Refactor Docker setup to create additional directories for ExaBGP and update named pipe creation in start.sh. Modify Docker_RUN.md to include new log and environment variable checks, and clean up generate_config.py by removing obsolete CLI settings.
Build and Push Docker Image / build (push) Successful in 3m18s

This commit is contained in:
2025-07-11 16:36:00 +07:00
parent a437b75540
commit 8c4e527913
4 changed files with 15 additions and 14 deletions
+5 -1
View File
@@ -285,10 +285,14 @@ docker exec bgp-server cat /app/exabgp.conf
docker exec bgp-server exabgp --validate /app/exabgp.conf
# Проверьте named pipes
docker exec bgp-server ls -la /app/run/
docker exec bgp-server ls -la /run/exabgp/
docker exec bgp-server ls -la /var/run/exabgp/
# Проверьте логи ExaBGP
docker exec bgp-server cat /app/logs/exabgp.log
# Проверьте переменные окружения
docker exec bgp-server env | findstr BGP_
```
### Проблема: Файл prefixes.txt не найден
+1 -1
View File
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
RUN pip install exabgp
# Создание структуры директорий
RUN mkdir -p /app/scripts /app/data /app/logs /run/exabgp
RUN mkdir -p /app/scripts /app/data /app/logs /run/exabgp /var/run/exabgp /usr/local/run/exabgp /usr/local/var/run/exabgp
# Копирование файлов
COPY exabgp.conf /app/exabgp.conf
-6
View File
@@ -29,12 +29,6 @@ process load-prefixes {{
encoder json;
}}
# Настройки CLI
cli {{
in /run/exabgp/exabgp.in;
out /run/exabgp/exabgp.out;
}}
# Настройки BGP
neighbor {neighbor_ip} {{
router-id {router_id};
+9 -6
View File
@@ -19,12 +19,15 @@ if [ ! -p "/run/exabgp/exabgp.in" ] || [ ! -p "/run/exabgp/exabgp.out" ]; then
chmod 600 /run/exabgp/exabgp.in /run/exabgp/exabgp.out
fi
# Также создаем в /app/run для совместимости
if [ ! -p "/app/run/exabgp.in" ] || [ ! -p "/app/run/exabgp.out" ]; then
echo "Creating named pipes in /app/run for compatibility..."
mkfifo /app/run/exabgp.in /app/run/exabgp.out
chmod 600 /app/run/exabgp.in /app/run/exabgp.out
fi
# Также создаем в других стандартных местах
for dir in /var/run/exabgp /usr/local/run/exabgp /usr/local/var/run/exabgp; do
mkdir -p $dir
if [ ! -p "$dir/exabgp.in" ] || [ ! -p "$dir/exabgp.out" ]; then
echo "Creating named pipes in $dir..."
mkfifo $dir/exabgp.in $dir/exabgp.out
chmod 600 $dir/exabgp.in $dir/exabgp.out
fi
done
# Проверка наличия файлов с префиксами
if [ ! -f "/app/data/prefixes.txt" ]; then