blob: 204a880f6d9699c2568b93170d9f92ce7f3c70da [file] [log] [blame]
Jonathan Hartca512e12018-02-24 10:36:29 -08001# Builds an ONOS docker image from a prebuilt tar.gz file.
2# tar.gz must be located in your onos directory at
3# buck-out/gen/tools/package/onos-package/onos.tar.gz
4
5FROM anapsix/alpine-java:8_server-jre
6
7# Change to /root directory
8RUN apk update && \
9 apk add curl && \
10 apk --update add tar && \
11 mkdir -p /root/onos
12WORKDIR /root/onos
13
14# Install ONOS
15COPY buck-out/gen/tools/package/onos-package/onos.tar.gz .
16RUN tar -xzvf onos.tar.gz --strip-components=1
17
18# Configure ONOS to log to stdout
19RUN sed -ibak '/log4j.rootLogger=/s/$/, stdout/' $(ls -d apache-karaf-*)/etc/org.ops4j.pax.logging.cfg
20
21LABEL org.label-schema.name="ONOS" \
22 org.label-schema.description="SDN Controller" \
23 org.label-schema.usage="http://wiki.onosproject.org" \
24 org.label-schema.url="http://onosproject.org" \
25 org.label-scheme.vendor="Open Networking Foundation" \
26 org.label-schema.schema-version="1.0"
27
28# Ports
29# 6653 - OpenFlow
30# 6640 - OVSDB
31# 8181 - GUI
32# 8101 - ONOS CLI
33# 9876 - ONOS intra-cluster communication
34EXPOSE 6653 6640 8181 8101 9876
35
36# Get ready to run command
37ENTRYPOINT ["./bin/onos-service"]
38CMD ["server"]