To install MongoDB
in your container, you have to run the following commands in the IDE terminal.
Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
Create a /etc/apt/sources.list.d/mongodb-enterprise.list
file for MongoDB.
echo "deb [ arch=amd64,arm64,ppc64el,s390x ] http://repo.mongodb.com/apt/ubuntu xenial/mongodb-enterprise/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
Reload local package database and install the MongoDB Enterprise packages.
sudo apt-get update
sudo apt-get install -y mongodb-enterprise
Start MongoDB
sudo systemctl start mongod