1 ####################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # daniel.smith@ericsson.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
10 # DOCKER FILE FOR LITHIUM ODL RC0 Testing
12 #############################################################################
15 #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
19 MAINTAINER Daniel Smith
22 #Run apt-get update one start just to check for updates when building
23 RUN echo "Updating APT"
25 RUN echo "Adding wget"
26 RUN apt-get install -y wget
27 RUN apt-get install -y net-tools
28 RUN apt-get install -y openjdk-7-jre
29 RUN apt-get install -y openjdk-7-jdk
30 RUN apt-get install -y openssh-server
31 RUN apt-get install -y vim
32 RUN apt-get install -y expect
33 RUN apt-get install -y daemontools
34 RUN mkdir -p /opt/odl_source/lithium
35 RUN bash -c 'echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" >> ~/.bashrc'
39 #Now lets got and fetch the ODL distribution
40 RUN echo "Fetching Lithium Rc0"
41 RUN wget https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.3.0-SNAPSHOT/distribution-karaf-0.3.0-20150612.144348-2492.tar.gz -O /opt/odl_source/lithium/distribution-karaf-0.3.0-Lithium-RC0.tar.gz
43 RUN echo "Untarring ODL inplace"
44 RUN mkdir -p /opt/odl/lithium
45 RUN tar zxvf /opt/odl_source/lithium/distribution-karaf-0.3.0-Lithium-RC0.tar.gz -C /opt/odl/lithium
47 RUN echo "Installing DLUX and other features into ODL"
48 #COPY dockerfile/container_scripts/start_odl_docker.sh /etc/init.d/start_odl_docker.sh
49 COPY container_scripts/start_odl_docker_container.sh /etc/init.d/
50 COPY container_scripts/speak.sh /etc/init.d/
51 #COPY dockerfile/container_scripts/speak.sh /etc/init.d/speak.sh
52 RUN chmod 777 /etc/init.d/start_odl_docker_container.sh
53 RUN chmod 777 /etc/init.d/speak.sh
59 # PORTS FOR BASE SYSTEM AND DLUX
72 # PORTS FOR OVSDB AND ODL CONTROL
81 # set the ENTRYPOINT - An entry point allows us to run this container as an exectuable
82 CMD ["/etc/init.d/start_odl_docker_container.sh"]