•   21.05.2024
#Programming #MongoDB #Software #Docker

How to install MongoDB with Docker and Docker Compose on windows 10

1 phút đọc

Install MongoDB with Docker Compose

1. Clone source từ Github:

git clone https://github.com/tuannguyen29/docker-compose-mongoDB.git


2. Cài đặt

Sau đó vào folder vừa clone, dùng Gitbash hoặc Terminal để chạy lệnh khởi động docker compose:

docker-compose up -d

 

Kiểm tra trạng thái bằng lệnh
Kiểm tra trạng thái bằng lệnh

 

Kiểm tra trạng thái bằng giao diện của Docker Desktop
Kiểm tra trạng thái bằng giao diện của Docker Desktop


3. Kết nối Mongodb với Navicat:
 

Cài đặt kết nối:

  • Host: localhost hoặc 127.0.0.1
  • Port: 27018
  • Authentication Database: admin
  • Username: root
  • Password: rootpassword

connect mongo with navicat·

connect mongo with navicat
Kết nối thành công

 

Video hướng dẫn chi tiết:

 


Hashtags: