-
Notifications
You must be signed in to change notification settings - Fork 34
Docker tricks
Pablo Ojanguren edited this page Mar 20, 2017
·
1 revision
There are some directories that will give access to configuration and log
-
/usr/local/etc/demo-swellrt
- configuration files -
/var/local/log/demo-swellrt
- log files
Start the image with the following command
docker run -v /usr/local/etc/demo-swellrt:/usr/local/swellrt/config \
-v /var/local/log/demo-swellrt:/usr/local/swellrt/log \
--name demo-swellrt -h demo-swellrt.p2pvalue.eu -p 127.0.0.1:9898:9898 -d p2pvalue/swellrt
docker pull p2pvalue/swellrt
docker stop demo-swellrt
docker rm demo-swellrt
# -> run the Run image command
MongoDB files can be stored in the host machine. We will put them at /var/local/lib/swellrt-demo/db
-
/var/local/lib/swellrt-demo/db
- MongoDB data files
docker run --name demo-swellrt-mongo -v /var/local/lib/swellrt-demo/db:/data/db -d mongo
Then you must edit /usr/local/etc/demo-swellrt/server.config
and configure SwellRT to use the mongodb backend whenever you want.
Change also the mongodb_host
property to demo-swellrt-mongo
mongodb_host = demo-swellrt-mongo
Finally, exec the run command with the --link demo-swellrt-mongo:mongo
option
See what instances are running
docker ps
Get the IP address of the instance
docker inspect <name>
Run mongo command with the IP
mongo --host <ip>
Texts and images of the SwellRT Wiki are released as open content, under the Creative Commons Attribution 4.0 International.