Skip to content

Commit 8d31647

Browse files
author
German
committed
Switches to the new ghcr repo and adds documentation for
documentdb-local
1 parent cf03227 commit 8d31647

8 files changed

Lines changed: 129 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ Welcome to the official documentation for [DocumentDB](https://github.com/docume
88
- [API Reference](api-reference/index.md) - Detailed API documentation
99
- [PostgreSQL API](postgres-api/index.md) - PostgreSQL-compatible API documentation
1010
- [Architecture](architecture/index.md) - System architecture and design principles
11+
- [documentdb-local](documentdb-local/index.md) - Detailed documentation of the documentdb-local container image
12+
- [DocumentDB Kubernetes Operator](https://documentdb.io/documentdb-kubernetes-operator) - Documentation for the DocumentDB Kubernetes Operator

documentdb-local/index.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# DocumentDB-local
2+
DocumentDB is available as a Docker container. It supports running on a wide variety of processors and operating systems and make it easy to try out and test DocumentDB.
3+
4+
5+
## Prerequisites
6+
7+
- [Docker](https://www.docker.com/)
8+
9+
## Installation
10+
11+
Get the Docker container image using `docker pull`. The container image is published to the Github container registry as `ghcr.io/documentdb/documentdb/documentdb-local:latest`.
12+
13+
```bash
14+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
15+
16+
```
17+
18+
## Running
19+
20+
To run the container, use `docker run`. Afterwards, use `docker ps` to validate that the container is running.
21+
22+
```bash
23+
docker run -dt -p 10260:10260 --name docdb ghcr.io/documentdb/documentdb/documentdb-local:latest --username demo --password test
24+
25+
26+
docker ps
27+
```
28+
29+
```output
30+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31+
5aff734a3591 ghcr.io/documentdb/documentdb/documentdb-local:latest "/bin/bash -c '/home…" 5 seconds ago Up 4 seconds 0.0.0.0:10260->10260/tcp, :::10260->10260/tcp optimistic_blackwell
32+
```
33+
34+
> The DocumenttDB Mongo protocol gateway endpoint is typically available on port `10260`. To access this with `mongosh` run:
35+
36+
```bash
37+
mongosh "mongodb://demo:test@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true"
38+
```
39+
40+
```output
41+
Current Mongosh Log ID: 690cdcb84e2e610f0f48e609
42+
Connecting to: mongodb://<credentials>@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true&directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.5.1
43+
Using MongoDB: 7.0.0
44+
Using Mongosh: 2.5.1
45+
mongosh 2.5.9 is available for download: https://www.mongodb.com/try/download/shell
46+
47+
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
48+
49+
[direct: mongos] test>
50+
```
51+
52+
## Docker commands
53+
54+
The following table summarizes the available Docker commands for configuring the emulator. This table details the corresponding arguments, environment variables, allowed values, default settings, and descriptions of each command.
55+
56+
| Requirement | Arg | Env | Allowed values | Default | Description |
57+
|---|---|---|---|---|---|
58+
| Print the settings to stdout from the container | `--help`, `-h` | N/A | N/A | N/A | Display information on available configuration |
59+
60+
To be continued...
61+
## Feature support
62+
63+
Please refer to the documentdb documentation for currently supported features,
64+
65+
66+
## Limitations
67+
68+
In addition to features not yet supported or not planned, the following list includes current limitations of docuemntdb-lcoal:
69+
70+
To be added.
71+
72+
73+
## Installing certificates
74+
75+
DocumentDB-local by default will generate new selef signed certificates each tome you start the container. To avoid certificate errors these can be installed on the local host. The example belw will show how to use this with `mongosh`.
76+
77+
### Get certificate
78+
79+
In a `bash` window, run the following to copy the certificate from the container to the local
80+
host:
81+
82+
```bash
83+
docker cp docdb:/home/documentdb/gateway/pg_documentdb_gw/cert.pem ~/documentdb-cert.pem
84+
```
85+
86+
### Use the certificate with mongosh
87+
88+
```bash
89+
mongosh localhost:10260 -u demo -p test --authenticationMechanism SCRAM-SHA-256 --tls --tlsCAFile ~/documentdb-cert.pem
90+
```
91+
92+
```output
93+
Current Mongosh Log ID: 690ce1171181053c6edbf354
94+
Connecting to: mongodb://<credentials>@localhost:10260/?directConnection=true&serverSelectionTimeoutMS=2000&authMechanism=SCRAM-SHA-256&tls=true&tlsCAFile=%2FUsers%2Fgeeichbe%2Fdocumentdb-cert.pem&appName=mongosh+2.5.1
95+
Using MongoDB: 7.0.0
96+
Using Mongosh: 2.5.1
97+
mongosh 2.5.9 is available for download: https://www.mongodb.com/try/download/shell
98+
99+
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
100+
101+
[direct: mongos] test>
102+
```
103+
104+
## Use in continuous integration workflow
105+
TBD
106+
107+
## Reporting issues
108+
109+
If you encounter issues with using this version of DoucmenttDB, open an issue in the GitHub repository (<https://github.com/documentdb/documentdb/issues>) and tag it with the label `documentdb-local`.

getting-started/mongo-shell-quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Before connecting from Node.js, make sure you have a running DocumentDB instance
1616

1717
```bash
1818
# Pull the latest DocumentDB Docker image
19-
docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
19+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
2020

2121
# Tag the image for convenience
22-
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
22+
docker tag ghcr.io/documentdb/documentdb/documentdb-local:latest documentdb
2323

2424
# Run the container with your chosen username and password
2525
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
26-
docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
26+
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
2727
```
2828
> **Note:** During the transition to the Linux Foundation, Docker images may still be hosted on Microsoft's container registry. These will be migrated to the new DocumentDB organization as the transition completes.
2929
>

getting-started/nodejs-setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Before connecting from Node.js, make sure you have a running DocumentDB instance
1616

1717
```bash
1818
# Pull the latest DocumentDB Docker image
19-
docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
19+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
2020

2121
# Tag the image for convenience
22-
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
22+
docker tag ghcr.io/documentdb/documentdb/documentdb-local:latest documentdb
2323

2424
# Run the container with your chosen username and password
2525
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
26-
docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
26+
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
2727
```
2828
> **Note:** During the transition to the Linux Foundation, Docker images may still be hosted on Microsoft's container registry. These will be migrated to the new DocumentDB organization as the transition completes.
2929
>

getting-started/prebuilt-packages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Download and install DocumentDB using our pre-built packages for various platfor
2828
1. Official images
2929
```bash
3030
# Pull latest stable version
31-
docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
31+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
3232

3333
# Tag the image for convenience
34-
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
34+
docker tag ghcr.io/documentdb/documentdb/documentdb-local:latest documentdb
3535

3636
# Run the container with your chosen username and password
37-
docker run -dt -p 10260:10260 --name documentdb-container ghcr.io/microsoft/documentdb/documentdb-local:latest --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
37+
docker run -dt -p 10260:10260 --name documentdb-container ghcr.io/documentdb/documentdb/documentdb-local:latest --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
3838
```
3939
> **Note:** Replace `<YOUR_USERNAME>` and `<YOUR_PASSWORD>` with your desired credentials. You must set these when creating the container for authentication to work.
4040
>

getting-started/python-setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ Learn how to set up and use DocumentDB with Python using the official MongoDB Py
2727
1. Setting up DocumentDB with Docker
2828
```bash
2929
# Pull the latest DocumentDB Docker image
30-
docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
30+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
3131

3232
# Tag the image for convenience
33-
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
33+
docker tag ghcr.io/documentdb/documentdb/documentdb-local:latest documentdb
3434

3535
# Run the container with your chosen username and password
3636
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
37-
docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
37+
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
3838
```
3939
> **Note:** During the transition to the Linux Foundation, Docker images may still be hosted on Microsoft's container registry. These will be migrated to the new DocumentDB organization as the transition completes.
4040
> **Note:** Replace `<YOUR_USERNAME>` and `<YOUR_PASSWORD>` with your desired credentials. You must set these when creating the container for authentication to work.

getting-started/vscode-extension-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ Use the command palette:
5050
1. **Start a local DocumentDB instance using Docker:**
5151

5252
```bash
53-
docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
54-
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
53+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
54+
docker tag ghcr.io/documentdb/documentdb/documentdb-local:latest documentdb
5555
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username admin --password password123
56-
docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
56+
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
5757
```
5858

5959
> **Note:** We're using port `10260` to avoid conflicts with other local database services. You can use port `27017` (the standard MongoDB port) if you prefer.

getting-started/vscode-quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Get started with DocumentDB using the Visual Studio Code extension for a seamles
2121

2222
1. Creating a new DocumentDB instance
2323
```bash
24-
docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
25-
docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
24+
docker pull ghcr.io/documentdb/documentdb/documentdb-local:latest
25+
docker tag ghcr.io/documentdb/documentdb/documentdb-local:latest documentdb
2626
docker run -dt -p 10260:10260 --name documentdb-container documentdb --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
27-
docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
27+
docker image rm -f ghcr.io/documentdb/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"
2828

2929
```
3030
> **Note:** During the transition to the Linux Foundation, Docker images may still be hosted on Microsoft's container registry. These will be migrated to the new DocumentDB organization as the transition completes.

0 commit comments

Comments
 (0)