1760c94ffc93151efd8b11f9a4be94fcf8da35a0
[integration/packaging.git] / packaging / docker / Dockerfile
1 # Base the image on Debian 7
2 # Picked Debian because it's small (85MB)
3 # https://registry.hub.docker.com/_/debian/
4 FROM debian:7
5 MAINTAINER OpenDaylight Project <info@opendaylight.org>
6
7 # Install required software (170MB)
8 RUN apt-get update && apt-get install -y openjdk-7-jre-headless wget
9
10 # Download and install ODL
11 WORKDIR /opt
12 RUN mkdir opendaylight
13 # Doing all of these in one step reduces the resulting image size by 229MB
14 RUN wget -q "http://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" && \
15     tar -xf distribution-karaf-0.2.2-Helium-SR2.tar.gz -C opendaylight --strip-components=1 && \
16     rm -rf distribution-karaf-0.2.2-Helium-SR2.tar.gz
17
18 # TODO: Verify that these are all of the ODL Helium ports and no extra
19 # Ports
20 # 162 - SNMP4SDN (only when started as root)
21 # 179 - BGP
22 # 1088 - JMX access
23 # 1790 - BGP/PCEP
24 # 1830 - Netconf
25 # 2400 - OSGi console
26 # 2550 - ODL Clustering
27 # 2551 - ODL Clustering
28 # 2552 - ODL Clustering
29 # 4189 - PCEP
30 # 4342 - Lisp Flow Mapping
31 # 5005 - JConsole
32 # 5666 - ODL Internal clustering RPC
33 # 6633 - OpenFlow
34 # 6640 - OVSDB
35 # 6653 - OpenFlow
36 # 7800 - ODL Clustering
37 # 8000 - Java debug access
38 # 8080 - OpenDaylight web portal
39 # 8101 - KarafSSH
40 # 8181 - MD-SAL RESTConf and DLUX
41 # 8383 - Netconf
42 # 12001 - ODL Clustering
43 EXPOSE 162 179 1088 1790 1830 2400 2550 2551 2552 4189 4342 5005 5666 6633 6640 6653 7800 8000 8080 8101 8181 8383 12001
44
45 WORKDIR /opt/opendaylight
46 ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64/jre
47 CMD ["./bin/karaf", "server"]