d7190a4ad0806c22f32f2d4b709bc02f4332207f
[integration/packaging.git] / packaging / docker / virtualization / Dockerfile
1 FROM ubuntu:12.04
2 MAINTAINER OpenDaylight Project <info@opendaylight.org>
3
4 # If the precise main universe repo is not already in the apt source list, then add it
5 RUN if [ \! -f "/etc/apt/sources.list" -o `grep "deb http://archive.ubuntu.com/ubuntu precise main universe" /etc/apt/sources.list | wc -l` -eq 0 ]; then echo "deb http://archive.ubuntu.com/ubuntu precise main universe" >> /etc/apt/sources.list; fi
6
7 # Remove the cache information. This helps eliminate "hash sum" errors when doing an update
8 # which may be caused when mirrors and caches are out of sync.
9 RUN rm -fR /var/lib/apt/lists/*
10 RUN mkdir /var/lib/apt/lists/partial
11
12 # Update the apt information
13 RUN apt-get update
14
15 # Install OpenJDK 7 in headless mode
16 RUN apt-get -y install openjdk-7-jre-headless unzip wget
17 RUN apt-get clean
18
19 # Download and Install OpenDaylight
20 RUN mkdir -p /opt/
21 ADD target/dist /opt/
22 RUN unzip /opt/*.zip -d /opt
23 RUN rm -rf /opt/*.zip
24 # Ports 
25 #    JMX:                  1088
26 #    Netconf:              1830
27 #    OSGi Console:         2400
28 #    Lisp Flow Mapping:    4342 # Service Provider Version
29 #    Internal Cluster RPC  5666
30 #    OpenFlow:             6633
31 #    ODL Clustering        7800
32 #    [default] Java Debug: 8000
33 #    ODL Web Portal:       8080
34 #    Netconf:              8383
35 #    ODL Clustering        12001
36 EXPOSE 1088 1830 2400 5666 6633 7800 8000 8080 8383 12001
37 WORKDIR /opt/opendaylight
38 ENTRYPOINT ["/opt/opendaylight/run.sh"]