We provide three official Docker images:
- Production image
- Development image
- All-in-one image
The last one is provided for quick testing and experiments and is unsuitable for production use cases. It is documented in the FerretDB repository.
The development images contain the debug build of FerretDB with test coverage instrumentation, race detector, and other changes that make it more suitable for debugging problems. In general, the production image should be used since it is faster and smaller. The following instructions use it, but the development image could be used in exactly the same way.
Setup with Docker Compose
The following steps describe a quick local setup:
Store the following in the
postgrescontainer runs PostgreSQL that would store data in the
./datadirectory on the host.
Start services with
docker compose up -d.
If you have
mongoshinstalled, just run it to connect to FerretDB. It will use credentials passed in
mongoshflags or MongoDB URI to authenticate to the PostgreSQL database. You'll also need to set
PLAIN. The example URI would look like:
See Authentication for more details.
If you don't have
mongosh, run the following command to run it inside the temporary MongoDB container, attaching to the same Docker network:
docker run --rm -it --network=ferretdb --entrypoint=mongosh mongo \
You can improve that setup by:
- securing connections with TLS;
- adding backups.