This project automates the MongoDB installation using a Docker container on Linux. Only exists support for Ubuntu and Manjaro. The repository contains the next two files:
-
full_install.sh (Install Docker and MongoDB Container)
-
mongodb_install.sh (Install MongoDB Container)
To run a script, you must execute it using sudo command.
$ sudo ./full_install.sh
$ sudo ./mongodb_container_install.sh
If the script goes down because of a permission error, you must grant permissions to the files.
# chmod +x full_install.sh
# chown your_user:your_user full_install.sh
-
$ docker images
(List images on docker) -
$ docker ps
(Check the status of executed containers) -
$ docker logs mongodb
(Show event logs) -
$ docker exec -it mongodb bash
(Enter to the container shell) -
$ docker stop mongodb
(Stop run container) -
$ docker start mongodb
(Start container) -
$ exit
(Leave from docker)
-
$ mongo -host localhost -port 27017
(Login to the mongodb session) -
$ exit
(Leave from mongodb)