-
Notifications
You must be signed in to change notification settings - Fork 65
/
Dockerfile
39 lines (33 loc) · 1.23 KB
/
Dockerfile
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
FROM centos:7
# install required packages
RUN ["yum", "install", "-y", "epel-release"]
RUN ["yum", "install", "-y", "git", "make", "libtool", "libxml2-devel", "file", "libxslt-devel", "libssh-devel", "libcurl-devel", "python-pip", "libxml2-python", "openssh-server", "augeas-devel" ]
RUN ["ssh-keygen", "-A"]
RUN ["pip", "install", "pyang"]
# clone, build and install libnetconf
RUN set -e -x; \
git clone https://github.com/CESNET/libnetconf.git /usr/src/libnetconf; \
cd /usr/src/libnetconf; \
./configure --prefix='/usr'; \
make; \
make install; \
ln -s /usr/lib/pkgconfig/libnetconf.pc /usr/lib64/pkgconfig/
# build and install netopeer-server
COPY server /usr/src/netopeer/server
RUN set -e -x; \
cd /usr/src/netopeer/server; \
./configure --prefix='/usr'; \
make; \
make install; \
cp -v config/datastore.xml /usr/etc/netopeer/cfgnetopeer/datastore.xml
# build and install transAPI/cfgsystem
COPY transAPI/cfgsystem /usr/src/netopeer/cfgsystem
RUN set -e -x; \
cd /usr/src/netopeer/cfgsystem; \
./configure --prefix='/usr'; \
make; \
make install; \
sed -i '/<hostname>/d' /usr/etc/netopeer/ietf-system/datastore.xml
CMD ["/usr/bin/netopeer-server", "-v", "2"]
# expose ports
EXPOSE 830