-
Notifications
You must be signed in to change notification settings - Fork 5
Quickstart (for Linux)
Make sure your requirements for Linux are installed.
Starting up a Server Container as an Administrator
-
Open a terminal window
-
Run
sudo docker run -d -p 27017:27017 --name deloitte-mongodb deloitteva/docker-mongodbThis will start up a server container and let it run in the background.
Running MongoDB Queries
-
Run
sudo docker run -it --name deloitte-mongodb-client --link deloitte-mongodb:mongo --rm deloitteva/docker-mongodb-clientThis will start up a client container that will be running Mongo Shell and allow you to interact with it.
-
Execute your Mongo shell queries
Running Tomcat Application Container
-
Run
sudo docker run -it -p 8080:8080 --rm --link deloitte-mongodb:mongo -v /mydata:/data deloitteva/docker-snpThis will start up the tomcat application container with the web application loaded. Note that it is assumed that you have downloaded the data files to the /mydata directory. Please adjust this accordingly. Once the system has started up (which can take a couple of minutes), REST points can then be accessed via the REST API
Exit/Stop/Cleanup Commands
-
In the Mongo shell, type
exitwhen you are done executing queries. -
Run
sudo docker kill deloitte-mongodbThis will stop the mongo server container.
-
run
sudo docker rm deloitte-mongodbto cleanupThis will help to cleanup and avoid issues starting another container with the same name going forward.