Some steps to create a MongoDB instance with initial data using Docker and Docker Compose Create a JSON file called init.json with your document: [
{
"name": "Kevin Martins",
"birthday": "29 April , 1995",
"nick": "Red King",
"age": 24
},
{
"name": "Kauan Martins",
"birthday": "02 July , 2008",
"nick": "Red as Floid",
"age": 11
}
] Create a Dockerfile and copy your JSON file: