Merge "Added validation to docker script verbs"
This commit is contained in:
commit
ba5ba0dffb
|
@ -109,3 +109,17 @@ This will start the container with the Dragonflow installed, but no service.
|
|||
This is useful in order to test any standalone binaries or code that should
|
||||
use the Dragonflow as a library, separated from the controller node.
|
||||
|
||||
|
||||
Using the container as a base for other container
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The docker entrypoint script accepts verbs. To only run the configuration and
|
||||
use the container with another main process, in your entrypoint run the
|
||||
following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
/opt/dragonflow/tools/run_dragonflow.sh --dragonflow_ip <DRAGONFLOW_IP> --db_ip <DB_IP>:2379 noop
|
||||
|
||||
Note that running a container with the noop verb without a live process as
|
||||
entrypoint will cause the container to exit immediately.
|
||||
|
|
|
@ -86,4 +86,10 @@ case "$VERB" in
|
|||
pip install bottle
|
||||
/usr/local/bin/df-rest-service --config /etc/dragonflow/dragonflow.ini --host 0.0.0.0 --json /var/dragonflow_model.json
|
||||
;;
|
||||
"noop")
|
||||
echo "Dragonflow script end"
|
||||
;;
|
||||
*)
|
||||
echo>&2 "Warning: Unknown option supplied to Dragonflow: $VERB"
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue