James Ridgway - Software Engineer


mongo-tmpfs is a MongoDB docker container designed to provide a high performance MongoDB instance for use in test environments.

The MongoDB instance has been optimised by disabling logging and preallocation and enabling smallfiles. Write speed has also been improved by ensuring the data directory is written to a tmpfs volume.

Using mongo-tmpfs

  1. Pull the docker image:

    $ docker pull jamesridgway/mongo-tmpfs:3.6
  2. Run the container

    $ docker run  --name mongo-tmpfs --privileged -p 27017:27017 jamesridgway/mongo-tmpfs:3.6
  3. You can now connect to the mongo instance on localhost:27017.

Supported MongoDB Versions

mongo-tmpfs is available for all major MongoDB versions:

Mongo Version Docker Tag
3.0 jamesridgway/mongo-tmpfs:3.0
3.2 jamesridgway/mongo-tmpfs:3.2
3.4 jamesridgway/mongo-tmpfs:3.4
3.6 jamesridgway/mongo-tmpfs:3.6