-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
60 lines (46 loc) · 1.25 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
FROM debian:wheezy
MAINTAINER Ozzy Johnson <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
ENV MININET_REPO https://github.com/mininet/mininet.git
ENV MININET_INSTALLER mininet/util/install.sh
ENV INSTALLER_SWITCHES -fbinptvwyx
WORKDIR /tmp
# Update and install minimal.
RUN \
apt-get update \
--quiet \
&& apt-get install \
--yes \
--no-install-recommends \
--no-install-suggests \
autoconf \
automake \
ca-certificates \
git \
libtool \
net-tools \
openssh-client \
patch \
vim \
# Clone and install.
&& git clone $MININET_REPO \
# A few changes to make the install script behave.
&& sed -e 's/sudo //g' \
-e 's/~\//\//g' \
-e 's/\(apt-get -y install\)/\1 --no-install-recommends --no-install-suggests/g' \
-i $MININET_INSTALLER \
# Install script expects to find this. Easier than patching that part of the script.
&& touch /.bashrc \
# Proceed with the install.
&& chmod +x $MININET_INSTALLER \
&& ./$MININET_INSTALLER -nfv \
# Clean up source.
&& rm -rf /tmp/mininet \
/tmp/openflow \
# Clean up packages.
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
VOLUME ["/data"]
WORKDIR /data
# Default command.
CMD ["bash"]