Configure ONOS in docker image to log to stdout
Change-Id: Ia7f900663298750de7c1d67b9bf0f181b5f6f452
diff --git a/Dockerfile b/Dockerfile
index 82085e7..bf7f9bf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -37,6 +37,9 @@
# Install ONOS
COPY --from=builder /src/tar/ .
+# Configure ONOS to log to stdout
+RUN sed -ibak '/log4j.rootLogger=/s/$/, stdout/' $(ls -d apache-karaf-*)/etc/org.ops4j.pax.logging.cfg
+
LABEL org.label-schema.name="ONOS" \
org.label-schema.description="SDN Controller" \
org.label-schema.usage="http://wiki.onosproject.org" \
@@ -53,5 +56,5 @@
EXPOSE 6653 6640 8181 8101 9876
# Get ready to run command
-WORKDIR /root/onos
ENTRYPOINT ["./bin/onos-service"]
+CMD ["server"]