adding Dockerfile for automated builds
Change-Id: Iff973059986a0e0bba0606c4d305e293797f5e40
Showing
1 changed file
with
55 additions
and
0 deletions
tools/build/docker/Dockerfile
0 → 100644
1 | +FROM debian | ||
2 | +MAINTAINER Ali Al-Shabibi <ali@onlab.us> | ||
3 | + | ||
4 | +# Install required software | ||
5 | +ENV DEBIAN_FRONTEND noninteractive | ||
6 | +RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ | ||
7 | + echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ | ||
8 | + echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ | ||
9 | + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ | ||
10 | + apt-get update && \ | ||
11 | + apt-get install -y oracle-java8-installer oracle-java8-set-default maven git curl && \ | ||
12 | + apt-get clean && apt-get purge | ||
13 | + | ||
14 | +# Set the environment variables | ||
15 | +ENV HOME /root | ||
16 | +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle | ||
17 | +ENV ONOS_ROOT /src/onos | ||
18 | +ENV KARAF_VERSION 3.0.3 | ||
19 | +ENV KARAF_ROOT /root/onos/apache-karaf-3.0.3 | ||
20 | +ENV KARAF_LOG /root/onos/apache-karaf-3.0.3/data/log/karaf.log | ||
21 | +ENV BUILD_NUMBER docker | ||
22 | +ENV PATH $PATH:$KARAF_ROOT/bin | ||
23 | + | ||
24 | + | ||
25 | +# Change to /src directory | ||
26 | +WORKDIR /src | ||
27 | + | ||
28 | +# Download ONOS | ||
29 | +RUN git clone https://github.com/opennetworkinglab/onos.git | ||
30 | + | ||
31 | +#Install ONOS | ||
32 | +WORKDIR /src/onos | ||
33 | +RUN mkdir -p /root/Downloads && \ | ||
34 | + mvn clean install && \ | ||
35 | + ./tools/build/onos-package | ||
36 | + | ||
37 | +# Change to /root directory | ||
38 | +WORKDIR /root | ||
39 | + | ||
40 | +RUN mkdir onos && \ | ||
41 | + cp /tmp/onos-*.docker.tar.gz . && \ | ||
42 | + tar -xf onos-*.docker.tar.gz -C onos --strip-components=1 && \ | ||
43 | + rm -rf onos-*.docker.tar.gz | ||
44 | + | ||
45 | + | ||
46 | +# Ports | ||
47 | +# 6633 - OpenFlow | ||
48 | +# 8181 - GUI | ||
49 | +# 8101 - ONOS CLI | ||
50 | +# 9876 - ONOS CLUSTER COMMUNICATION | ||
51 | +EXPOSE 6633 8181 8101 9876 | ||
52 | + | ||
53 | +# Get ready to run command | ||
54 | +WORKDIR /root/onos | ||
55 | +CMD ["./bin/onos-service"] |
-
Please register or login to post a comment