Install with Docker Compose
This guide will have you up running Dragonfly with
docker-compose in just a few minutes.
| This guide assumes you have
docker-compose installed on your machine. If not, Install Docker and Install Docker Compose before continuing.
# Download Official Dragonfly Docker Compose File
# Launch the Dragonfly Instance
docker-compose up -d
# Confirm image is up
docker ps | grep dragonfly
# ac94b5ba30a0 docker.dragonflydb.io/dragonflydb/dragonfly "entrypoint.sh drago…" 45 seconds ago Up 31 seconds 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp docker_dragonfly_1
# Log follow the dragonfly container
docker logs -f docker_dragonfly_1
Dragonfly will answer to both
redis requests out of the box!
You can use
redis-cli to connect to
localhost:6379 or open a browser and visit
Connect with a redis client.
From a new terminal:
127.0.0.1:6379> set hello world
127.0.0.1:6379> keys *
127.0.0.1:6379> get hello
Continue being great and build your app with the power of Dragonfly!
If you are attempting to tune Dragonfly for performance, consider
NAT performance costs associated with containerization.
docker-compose, there is a meaningful difference between an
overlaynetwork(which relies on docker
NATtraversal on every request) and using the
Fore more information, see the official docker-compose network_mode Docs