I’m trying to deploy Apache Ignite Web console on Linux(CentOS 7), but to run docker, i have to set host_absolute_path of MongoDB, How to handle it?
<host_absolute_path>
is a path on your host machine where MongoDB will create database files. This folder should be created before docker run. Go to Docker->Preferences->File Sharing and create the directory there or use the other way that suits your more.
Can anybody explain step by step?
docker run -d -p 80:80 -v <host_absolute_path>:/var/lib/mongodb --name web-console-standalone apacheignite/web-console-standalone
Advertisement
Answer
<host_absolute_path>
is just a path on your local machine. MongoDB is embedded into the docker image. You need to specify a path where MongoDB will store data.
It’s required because data need to survive restarts of the container. For example you can run:
docker run -it --rm -p 8080:80 -v /home/user/mongodb:/var/lib/mongodb apacheignite/web-console-standalone:2.7.0
It will run Web console 2.7.0 on 8080 port of the host machine and store data in /home/user/mongodb
. This directory should be already present when you start the container.