squeakywheel/redis
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. Read more on the Redis website.
Tag | Currently | Architectures |
---|---|---|
5.x | Redis 5.0.7 on Ubuntu 20.04 LTS | amd64 , arm64 , ppc64el , s390x |
Launch this image locally:
docker run -d --name redis-container -e TZ=UTC -p 30073:6379 -e REDIS_PASSWORD=mypassword ubuntu/redis:5.x
Access your MySQL server at localhost:30073
.
Parameters
Parameter | Description |
---|---|
-e TZ=UTC | Timezone. |
-e ALLOW_EMPTY_PASSWORD | Set to yes to allow connections to redis-server without a password. This setting is not recommended in production environments. |
-e REDIS_PASSWORD | Set the desired password to be used. |
-e REDIS_RANDOM_PASSWORD | Set this variable to 1 if you would like the entrypoint script to generate a random password for you. You will be able to see the generated password in the logs (docker logs ). |
-e REDIS_ALLOW_REMOTE_CONNECTIONS=yes | Set to no to disallow remote connections to redis-server (i.e., make redis-server listen to 127.0.0.1 only). |
-e REDIS_EXTRA_FLAGS | Specify extra flags to be passed to redis-server when initializing it. |
-p 30073:6379 | Expose redis on localhost:30073 . |
-v /path/to/redis.conf:/etc/redis/redis.conf | Local configuration fileredis.conf (try this example). |
Testing/Debugging
To debug the container:
$ docker logs -f redis-container
To get an interactive shell:
$ docker exec -it redis-container /bin/bash
This image also includes the redis-cli client for interactive container use:
$ docker network create redis-net
$ docker network connect redis-net redis-container
$ docker run -it --rm --network redis-net ubuntu/redis:5.x redis-cli -h redis-container
redis:6379> AUTH mypassword
OK
redis:6379> PING
PONG
redis:6379>
Works with any Kubernetes; if you don't have one, we recommend you install MicroK8s and microk8s enable dns storage
then alias kubectl
to microk8s.kubectl
.
Download redis.conf and redis-deployment.yml. Then:
$ kubectl create configmap redis-config --from-file=redis.conf
$ kubectl apply -f redis-deployment.yml
You will now be able to connect to the Redis server on localhost:30073
.
If you find a bug in our image or want to request a specific feature, please file a bug here:
https://bugs.launchpad.net/ubuntu-docker-images/+filebug
Please title the bug "redis: <reason>
".
Make sure to include the digest of the image you are using, from:
$ docker images --no-trunc --quiet ubuntu/redis:<tag>
docker pull squeakywheel/redis