-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (53 loc) · 1.86 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
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
FROM ubuntu:20.04
LABEL maintainer "Mohammad Mahdi Baghbani Pourvahid <MahdiBaghbani@protonmail.com>"
# set environment variables.
ENV DEBIAN_FRONTEND noninteractive
ENV CCNL_HOME /var/CCN-Lite
ENV CONTENT_STOR /var/content-store/
ENV PACPROTO ndn2013
ENV CCNL_PORT 9000
# append ccn lite binaries to path.
ENV PATH "${PATH}:${CCNL_HOME}/build/bin"
# install new packages.
RUN apt update && apt install --yes software-properties-common
RUN add-apt-repository --yes "deb http://security.ubuntu.com/ubuntu xenial-security main"
# install new packages.
RUN apt update && \
apt install --yes \
apt-utils \
pkg-config \
git \
git-core \
wget \
libssl-dev \
default-jre \
build-essential \
iproute2 \
net-tools
# add cmake signing key.
RUN wget --retry-connrefused --waitretry=1 \
--read-timeout=20 --timeout=15 -t 0 --no-dns-cache \
--output-document "${HOME}/kitware.asc" https://apt.kitware.com/keys/kitware-archive-latest.asc
RUN apt-key add "${HOME}/kitware.asc"
RUN rm "${HOME}/kitware.asc"
# add additional repositories.
RUN add-apt-repository --yes --no-update "deb https://apt.kitware.com/ubuntu/ bionic main"
# install new packages.
RUN apt --yes update
RUN apt install --yes cmake
# create content store directory.
WORKDIR ${CONTENT_STOR}
# get the ccn lite package from github.
WORKDIR /var
RUN git clone https://gitlab.com/Azadeh-Afzar/Computer-Science/Networking/CCN-Lite.git
# checkout to desired branch.
WORKDIR ${CCNL_HOME}
RUN git checkout master
# build ccn lite.
WORKDIR ${CCNL_HOME}/build
RUN cmake ../src
RUN make clean all
# expose port.
EXPOSE ${CCNL_PORT}/udp
# create a ccn relay.
CMD ccn-lite-relay -s ${PACPROTO} -d ${CONTENT_STOR} -v trace -u ${CCNL_PORT} -x /tmp/ccnl-relay.sock