Skip to content
Snippets Groups Projects
Commit 81313f00 authored by David Schmitz's avatar David Schmitz
Browse files

feature/exabgp_with_docker-compose: add alternative docker-compose file...

feature/exabgp_with_docker-compose: add alternative docker-compose file docker-compose-novol.yml for not using bind mounted FoD dir
parent 963b525d
No related branches found
No related tags found
No related merge requests found
version: "3"
services:
fod:
build:
context: .
dockerfile: docker-compose/Dockerfile_FOD-novol
container_name: fod
privileged: true
expose:
- "8000"
ports:
- "0.0.0.0:8000:8000"
env_file:
- ./docker-compose/.env_fod
#environment:
#- fod_volume_use=0
networks:
mgmt:
xfod:
ipv4_address: 10.197.36.2
#volumes:
#- ./:/opt/FOD
freertr:
build:
context: docker-compose
dockerfile: Dockerfile_FREERTR
container_name: freertr
privileged: true
expose:
- "23"
ports:
- "127.0.0.1:2323:2323"
env_file:
- ./docker-compose/.env_freertr
networks:
mgmt:
nhost1:
ipv4_address: 10.1.10.3
nhost2:
ipv4_address: 10.2.10.3
xfod:
ipv4_address: 10.197.36.3
depends_on:
- fod
volumes:
- freertr:/opt
- ./freertr/run:/rtr/run/
host1:
build:
context: docker-compose
dockerfile: Dockerfile_HOST1
container_name: host1
privileged: true
env_file:
- ./docker-compose/.env_host1
networks:
mgmt:
nhost1:
ipv4_address: 10.1.10.11
depends_on:
- fod
#volumes:
# - freertr:/opt
host2:
build:
context: docker-compose
dockerfile: Dockerfile_HOST2
container_name: host2
privileged: true
env_file:
- ./docker-compose/.env_host2
networks:
mgmt:
nhost2:
ipv4_address: 10.2.10.12
depends_on:
- fod
#volumes:
# - freertr:/opt
networks:
mgmt:
driver: bridge
ipam:
driver: default
config:
- subnet: 11.11.11.0/24
xfod:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.197.36.0/28
nhost1:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.1.10.0/24
nhost2:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.2.10.0/24
volumes:
freertr:
FROM ubuntu:latest
LABEL maintainer="FOD"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
RUN apt-get update -y && apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' --assume-yes -fuy dist-upgrade
RUN apt-get install -y git less man make gcc strace ltrace lsof file vim tshark tcpdump curl wget net-tools sudo psutils procps iptables iputils-ping iputils-tracepath hping3 iproute2 supervisor
RUN useradd exabgp
RUN mkdir -p /var/run/supervisor /opt/FOD
WORKDIR /opt/FOD
EXPOSE 8000
# build step1 (exploit docker build cache, only redone if ./install-debian.sh changed)
COPY install-debian.sh /opt/FOD
RUN ./install-debian.sh --basesw_os --here__with_venv_relative --supervisord
# build step2 (exploit docker build cache, only redone if ./install-debian.sh or requirements.txt changed)
COPY requirements.txt /opt/FOD
RUN ./install-debian.sh --basesw_python --here__with_venv_relative --supervisord
# build step3
COPY . /opt/FOD
RUN ./install-debian.sh --fodproper1 --here__with_venv_relative --supervisord --setup_admin_user --setup_admin_user5 admin ${ADMIN_PASS} ${ADMIN_EMAIL} ${FOD_ORG} ${FOD_ORG_NET} --exabgp ${FOD_EXABGP_LOCAL_ID} ${FOD_EXABGP_LOCAL_IP} ${FOD_EXABGP_LOCAL_AS} ${FOD_EXABGP_REMOTE_ID} ${FOD_EXABGP_REMOTE_IP} ${FOD_EXABGP_REMOTE_AS}
#
CMD supervisord -c docker-compose/fod_supervisord.conf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment