Docker images of Percona Server for MongoDB are hosted publicly on Decker Hub at https://hub.docker.com/r/percona/percona-server-mongodb/.
For more information about using Docker, see the Docker Docs.
Make sure that you are using the latest version of Docker.
The ones provided via
may be outdated and cause errors.
By default, Docker will pull the image from Docker Hub if it is not available locally.
To run Percona Server for MongoDB 3.2 in a Docker container, use the following command:
docker run -d \ --name psmdb \ --restart always \ percona/percona-server-mongodb:3.2
The previous command does the following:
docker run command instructs the
to run a container from an image.
-d option starts the container in detached mode
(that is, in the background).
--name option assigns a custom name for the container
that you can use to reference the container within a Docker network.
In this case:
--restart option defines the container’s restart policy.
Setting it to
always ensures that the Docker daemon
will start the container on startup
and restart it if the container exits.
percona/percona-server-mongodb:3.2 is the name and version tag
of the image to derive the container from.
For full list of tags, see https://hub.docker.com/r/percona/percona-server-mongodb/tags/
The Percona Server for MongoDB container exposes standard MongoDB port (27017),
which can be used for connection from an application
running in another container.
To link the application container to the
--link psmdb option when running the container with your app.
To start another container with the
that connects to your Percona Server for MongoDB container,
run the following comand:
docker run -it --link psmdb --rm percona/percona-server-mongodb:mongo mongo -h psmdb
For general inquiries, please send us your question and someone will contact you.