forked from containernet/containernet
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDockerfile
executable file
·39 lines (33 loc) · 1.06 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
FROM ubuntu:xenial
# install required packages
RUN apt-get clean
RUN apt-get update \
&& apt-get install -y git \
net-tools \
aptitude \
build-essential \
python3-setuptools \
python3-dev \
python3-pip \
software-properties-common \
ansible \
curl \
iptables \
iputils-ping \
sudo
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
# install containernet (using its Ansible playbook)
RUN python3 -m pip install --upgrade "pip < 21.0"
RUN python3 -m pip install ansible
COPY . /containernet
WORKDIR /containernet/ansible
RUN ansible-playbook -i "localhost," -c local --skip-tags "notindocker" install.yml
WORKDIR /containernet
RUN python3 setup.py develop
# Hotfix: https://github.com/pytest-dev/pytest/issues/4770
RUN python3 -m pip install "more-itertools<=5.0.0"
# tell containernet that it runs in a container
ENV CONTAINERNET_NESTED 1
# Important: This entrypoint is required to start the OVS service
ENTRYPOINT ["util/docker/entrypoint.sh"]
CMD ["python3", "examples/containernet_example.py"]