Skip to content

Docker usage

anapolg edited this page May 13, 2019 · 5 revisions

The tools can be run in API mode inside a docker container listening in port 5001.

#create the docker image
docker build --no-cache -f ./Dockerfile -t registry.sonata-nfv.eu:5000/tng-sdk-validation .

#run the image
docker run --rm -d --name tng-sdk-validate registry.sonata-nfv.eu:5000/tng-sdk-validation
quobis@quobis-UX303UA:~$ docker run --rm  --name tng-sdk-validate registry.sonata-nfv.eu:5000/tng-sdk-validation
CLI input arguments: ['--api']
Validator started as an API in IP: 127.0.0.1 and port 5001
 * Serving Flask app "tngsdk.validation.rest" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
2019-05-09 15:45:25 [INFO] [werkzeug]  * Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)
2019-05-09 15:45:25 [INFO] [werkzeug]  * Restarting with inotify reloader
2019-05-09 15:45:27 [WARNING] [werkzeug]  * Debugger is active!
2019-05-09 15:45:27 [INFO] [werkzeug]  * Debugger PIN: 114-383-370

Note: In the previous example the parameter -d is not present due to it activate detach mode, which does not show the console outputs of the container.

Clone this wiki locally