Public Repository

Last pushed: 2 years ago
Short Description
A little Redis Docker image with host-based data storage.
Full Description

Docker Image for Redis 2.8.14

What does this Docker image contains?

This Docker image contains a Redis 2.8.14 server compiled from source and
designed to use with data persistence in the host.

Usage Pattern

Build the image directly from GitHub (this can take a while):

docker build -t="geographica/redis:2.8.14"

or pull it from Docker Hub:

docker pull geographica/redis:2.8.14

Create a folder in the host to contain the data storage. We like to persist the
data storage in the host and not in the container:

mkdir /whatever/redis-2.8.14

Copy the desired Redis .conf file to the folder with the mandatory name
redis.conf, keeping in mind that the dir directive should point to
/data, the mount point in the container for the data storage. To start the

docker run -t -i --name="redis" -p 6379:6379
-v /whatever/redis-2.8.14/:/data/ geographica/redis:2.8.14

In this case, the container will retain control of the console, and, when exited
with Ctrl-C, will perform a clean shutdown of the database. The host can
check the Redis log on the host data storage. The default run command will seek
for redis.conf in the /data folder. Keep in mind that some configuration
on redis.conf will be needed, like for example the dir directive.

Also we can access it in interactive mode:

docker run --rm -t -i -p 6379:6379 -v /whatever/redis-2.8.14/:/data/
geographica/redis:2.8.14 /bin/bash

where we can start the server with:

redis-server /data/redis.conf

and inspect the database with redis_cli.

Docker Pull Command

Comments (0)