aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/docker/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-08-28 09:55:10 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-08-28 09:59:10 +0530
commit271c2be98055b1e37878e99f968c78290b223bc9 (patch)
treed0c30cc77a4278d48c5795b0af9727c9ac0608c3 /deployment/docker/src
parenta7a64477c28b433ba05afbe65155450d6ae3cba8 (diff)
Add deamon mode to dockerfile
Helps to run docker in either console mode(default) or deamon mode (by setting env MODE=deamon CLI-14 Change-Id: Iaa4adc2c5d20978ffa6c91bb270411cab7ff85a8 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'deployment/docker/src')
-rw-r--r--deployment/docker/src/main/docker/Dockerfile13
1 files changed, 12 insertions, 1 deletions
diff --git a/deployment/docker/src/main/docker/Dockerfile b/deployment/docker/src/main/docker/Dockerfile
index 91467443..1b453def 100644
--- a/deployment/docker/src/main/docker/Dockerfile
+++ b/deployment/docker/src/main/docker/Dockerfile
@@ -15,9 +15,20 @@ WORKDIR $ONAP_CLI_HOME
RUN chmod +x ./bin/onap.sh
RUN if [ ! -d ./data ]; then mkdir ./data; fi
RUN if [ ! -d ./onap-cli-schema ]; then mkdir ./onap-cli-schema; fi
+RUN if [ ! -f /var/log/lighttpd/access.log ]; then touch /var/log/lighttpd/access.log; fi
RUN ln ./bin/onap.sh /usr/sbin/onap
EXPOSE 80
-ENTRYPOINT service lighttpd start && /bin/bash
+
+ENV ONAP_HOST_URL http://localhost:8080
+ENV ONAP_USERNAME guest
+ENV ONAP_PASSWORD guest
+ENV ONAP_CLI_DEBUG false
+ENV ONAP_CLI_DEBUG_PORT 5005
+ENV MODE console
+
+ENTRYPOINT cp /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/ && \
+ service lighttpd start && \
+ if [ "$MODE" = "deamon" ]; then tailf /var/log/lighttpd/access.log;else /bin/bash; fi
RUN echo ONAP CLI docker successfully created !! \ No newline at end of file