forked from containernet/containernet
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
37 lines (31 loc) · 936 Bytes
/
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
FROM ubuntu:bionic
LABEL maintainer="manuel@peuster.de"
# 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
# install containernet (using its Ansible playbook)
COPY . /containernet
WORKDIR /containernet/ansible
RUN ansible-playbook -i "localhost," -c local --skip-tags "notindocker" install.yml
WORKDIR /containernet
RUN make develop
# Hotfix: https://github.com/pytest-dev/pytest/issues/4770
RUN pip3 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"]