aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deployment/docker/src/main/docker/Dockerfile17
1 files changed, 13 insertions, 4 deletions
diff --git a/deployment/docker/src/main/docker/Dockerfile b/deployment/docker/src/main/docker/Dockerfile
index 0c08bc54..54f296bc 100644
--- a/deployment/docker/src/main/docker/Dockerfile
+++ b/deployment/docker/src/main/docker/Dockerfile
@@ -17,9 +17,10 @@ FROM openjdk:8-jre-slim
ENV OPEN_CLI_HOME=/opt/oclip \
OPEN_CLI_DEBUG=false \
OPEN_CLI_DEBUG_PORT=5005 \
- OPEN_CLI_MODE=console \
+ OPEN_CLI_MODE=shell \
OPEN_CLI_PRODUCT_IN_USE=onap-beijing \
- GOTTY_TITLE_FORMAT="{{ .command }}"
+ GOTTY_TITLE_FORMAT="{{ .command }}" \
+ OCLIP_GRPC_SERVER="http://oclip_grpc:50051"
ADD ./STAGE $OPEN_CLI_HOME
WORKDIR $OPEN_CLI_HOME
@@ -32,8 +33,12 @@ RUN apt-get update && apt-get install -y lighttpd git curl pandoc vim && \
pandoc -t plain $OPEN_CLI_HOME/docs/README.md > $OPEN_CLI_HOME/docs/oclip-readme.txt && \
apt-get purge -y pandoc && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/go /tmp/gotty /tmp/* /var/tmp/* && \
chmod +x $OPEN_CLI_HOME/bin/oclip.sh && \
+ chmod +x $OPEN_CLI_HOME/bin/oclip-rcli.sh && \
+ chmod +x $OPEN_CLI_HOME/bin/oclip-cmdflow-server.sh && \
ln $OPEN_CLI_HOME/bin/oclip.sh /usr/sbin/oclip && \
ln $OPEN_CLI_HOME/bin/oclip.sh /usr/sbin/onap && \
+ ln $OPEN_CLI_HOME/bin/oclip-cmdflow-server.sh /usr/sbin/oclip-grpc && \
+ ln $OPEN_CLI_HOME/bin/oclip-rcli.sh /usr/sbin/oclipr && \
if [ ! -d $OPEN_CLI_HOME/data ]; then mkdir $OPEN_CLI_HOME/data; fi && \
if [ ! -d $OPEN_CLI_HOME/open-cli-schema ]; then mkdir $OPEN_CLI_HOME/open-cli-schema; fi && \
if [ ! -f /var/log/lighttpd/access.log ]; then touch /var/log/lighttpd/access.log; fi && \
@@ -45,5 +50,9 @@ RUN apt-get update && apt-get install -y lighttpd git curl pandoc vim && \
cp $OPEN_CLI_HOME/installer/cli-*.zip /var/www-data/servers/open-cli/oclip.zip
EXPOSE 80
EXPOSE 8080
-
-ENTRYPOINT if [ "$OPEN_CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect oclip; else oclip -v && /bin/bash; fi
+EXPOSE 50051
+ENTRYPOINT if [ "$OPEN_CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect oclip; \
+ elif [ "$OPEN_CLI_MODE" = "ocs-web" ]; then echo "****** OCLIP Web Command Server ******"; service lighttpd start; \
+ elif [ "$OPEN_CLI_MODE" = "ocs-grpc" ]; then echo "****** OCLIP gRPC Command Server ******"; oclip-grpc; \
+ elif [ "$OPEN_CLI_MODE" = "occ" ]; then echo "****** OCLIP Web Command Console (OCC) ******"; gotty --permit-write --reconnect oclip; \
+ else echo "****** OCLIP Command Shell******"; oclip -v && /bin/bash; fi