forked from Exa-Networks/exabgp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.remote
47 lines (36 loc) · 1.22 KB
/
Dockerfile.remote
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
# syntax=docker/dockerfile:1.4
# how to build and run exabgp using docker (from github with pip)
# this Dockerfile does not require a local installation but the container is bigger
# docker build --build-arg version=master -f Dockerfile.remote -t exabgp.remote ./
# docker run -it exabgp.remote exabgp
# debug the build
# docker build --progress=plain --no-cache --build-arg version=master -f Dockerfile.remote -t exabgp ./
FROM python:3-slim-buster
ARG version="master"
RUN apt update \
&& apt -y dist-upgrade \
&& apt install -y git \
&& apt install -y dumb-init \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
ADD . /opt/exabgp
RUN useradd -r exa \
&& mkdir /etc/exabgp \
&& mkfifo /run/exabgp.in \
&& mkfifo /run/exabgp.out \
&& chown exa /run/exabgp.in \
&& chown exa /run/exabgp.out \
&& chmod 600 /run/exabgp.in \
&& chmod 600 /run/exabgp.out
COPY <<EOF /usr/local/etc/exabgp/exabgp.env
[exabgp.daemon]
user = 'exa'
EOF
RUN cd /tmp \
&& echo Building ${version} \
&& pip install -U setuptools \
&& pip install git+https://github.com/Exa-Networks/exabgp.git@${version}
WORKDIR /etc/exabgp
ENTRYPOINT [ \
"/usr/bin/dumb-init", "--", \
"/usr/local/bin/exabgp" \
]