Quick start guide for vs code extension quick start.
Get started with DocumentDB using the Visual Studio Code extension for a seamless development experience.
Ctrl+Shift+X
or Cmd+Shift+X
)docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
Replace <YOUR_USERNAME>
and <YOUR_PASSWORD>
with your desired credentials. You must set these when creating the container for authentication to work.
Port 10260
is used by default in these instructions to avoid conflicts with other local database services. You can use port 27017
(the standard MongoDB port) or any other available port if you prefer. If you do, be sure to update the port number in both your docker run
command and your connection string accordingly.
mongodb://<YOUR_USERNAME>:<YOUR_PASSWORD>@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true&authMechanism=SCRAM-SHA-256
{
"name": "Test Document",
"type": "example",
"created_at": new Date()
}