1 ####################################################################
3 # Dockerfile to build a ODL (Karaf) Docker Container
5 # Copyright daniel.smith@ericsson.com
8 ####################################################################
11 #Set the base image - note: the current release of Karaf is using Jdk7 and alot of 12.04, so we will use it rather than 14.04 and backport a ton of stuff
15 MAINTAINER Daniel Smith
17 #Run apt-get update one start just to check for updates when building
18 RUN echo "Updating APT"
20 RUN echo "Adding wget"
21 RUN apt-get install -y wget
22 RUN apt-get install -y net-tools
23 RUN apt-get install -y openjdk-7-jre
24 RUN apt-get install -y openjdk-7-jdk
25 RUN apt-get install -y openssh-server
26 RUN apt-get install -y vim
27 RUN apt-get install -y expect
28 RUN apt-get install -y daemontools
29 RUN mkdir -p /opt/odl_source
30 RUN bash -c 'echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" >> ~/.bashrc'
33 #Now lets got and fetch the ODL distribution
34 RUN echo "Fetching ODL"
35 RUN wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.2-Helium-SR2/distribution-karaf-0.2.2-Helium-SR2.tar.gz -O /opt/odl_source/distribution-karaf-0.2.2-Helium-SR2.tar.gz
37 RUN echo "Untarring ODL inplace"
39 RUN tar zxvf /opt/odl_source/distribution-karaf-0.2.2-Helium-SR2.tar.gz -C /opt/odl
41 RUN echo "Installing DLUX and other features into ODL"
42 COPY tmp/dockerfile/container_scripts/start_odl_docker.sh /etc/init.d/start_odl_docker.sh
43 COPY tmp/dockerfile/container_scripts/speak.sh /etc/init.d/speak.sh
44 RUN chmod 777 /etc/init.d/start_odl_docker.sh
45 RUN chmod 777 /etc/init.d/speak.sh
49 # PORTS FOR BASE SYSTEM AND DLUX
62 # PORTS FOR OVSDB AND ODL CONTROL
71 # set the ENTRYPOINT - An entry point allows us to run this container as an exectuable
72 CMD ["/etc/init.d/start_odl_docker.sh"]