in This Tutorial you will Learn " How To Run MongoDB in a Docker Container On Rocky Linux 8.5"
MongoDB is a relational open source NoSQL database. Easy to use, it stores data in JSON-like documents. Automated scalability and high-performance. Ideal for developing cloud native applications.
Docker is an open-source virtualization technology known a containerization platform for software containers.
Rocky Linux is an open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; dnf groupinstall "Development Tools" -y
docker --version ; docker-compose --version
docker pull mongo Or docker pull mongo:4.2.2
docker images
mkdir -p /mongodata
docker run -it -v mongodata:/data/db --name mongodb -d mongo
Or
docker run -it -v mongodata:/data/db -p 27017:27017 --name mongodb -d mongo
docker ps
docker logs mongodb
docker exec -it mongodb bash
mongo -host localhost -port 27017
docker stop mongodb
docker start mongodb
docker ps
_________________________________________________________________________________________
Wednesday, February 16, 2022
Dockerizing MongoDB On Rocky Linux 8.5
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment