Skip to main content

Posts

Showing posts with the label Docker

A Demo On MongoDB Running On Docker And Visual Studio Code MongoDB Extension PlayGround

In this article, we are going to understand MongoDB along with its Docker Composer and its Visual Studio Code extension playground. MongoDB: MongoDB is a source-available cross-platform document-oriented database. It is also called a NoSQL database or Non-Relational database. In MongoDB 'Collection' is equivalent to the Table in SQL database. In MongoDB data is stored as 'Document' that is equivalent to a table record in an SQL database. The 'Document' contains JSON data which will be stored in BSON(Binary JSON) format. MongoDB Docker Composer: Let's implement docker-compose to create a MongoDB docker container. (Step 1): Download and install the 'Docker Desktop' application. The application should be in running mode. (Step 2): Add a new folder for our MongoDB docker composer. Then add the file like 'docker-compose.yml'. docker-compose.yml: version: '3.8' services: mongodb: image: mongo:5.0 volumes: - ./mongo/dat

Introduction On PostgreSQL Database Using Docker

PostgreSQL is a free open-source relational database management system. In this article, we will learn basic steps to run the PostgreSQL Docker image. Install And Setup Docker: Step1: Download docker into our local system "https://docs.docker.com/desktop/" . Docker was available for all desktop operating systems. Step2: After downloading the docker installer, then install it. Now to run any docker containers(eg: Redis, MongoDB, PostgreSQL, etc) this docker instance we just installed should be active(should be running). Postgres Docker Image: We have to download or pull the Postgres docker image into our local system by running the below command. docker pull postgres Run Postgres Docker Container: After downloading the Postgres image, need to start the container by running the below command. docker run --name mypostgres -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres --name flag to specify the name of our container. -e flag to specify an environmental variabl