ubuntu/redis
Redis, an open source key-value store. Long-term versions maintained by Canonical.
100K+
Current Redis™ software Docker Image from Canonical, based on Ubuntu. Receives security updates and tracks the newest combination of Redis™ software and Ubuntu. This repository is free to use and exempted from per-user rate limits.
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.
Up to 5 years free security maintenance on LTS channels.
Up to 10 years customer security maintenance
from canonical/redis
. Request access.
Tags in italics are not available in ubuntu/redis but are shown here for completeness.
Channel Tag | Currently | Architectures | ||
---|---|---|---|---|
6.2-22.04_beta | Redis™ software 6.2 on Ubuntu 22.04 LTS | amd64 , arm64 , ppc64el , s390x | ||
track_risk |
Channel Tag shows the most stable channel for that track. A track is a combination of both the application version and the underlying Ubuntu series, eg 1.0-22.04
.
Channels are ordered from the most stable to the least stable
, candidate
, beta
, edge
.
More risky channels are always implicitly available.
So if beta
is listed, you can also pull edge
. If candidate
is listed, you can pull beta
and edge
.
When stable
is listed, all four are available.
Images are guaranteed to progress through the sequence edge
, beta
, candidate
before stable
.
If your usage includes commercial redistribution or requires unavailable channels/versions, please get in touch with the Canonical team (or using rocks@canonical.com).
Launch this image locally:
docker run -d --name redis-container -e TZ=UTC -p 30073:6379 -e REDIS_PASSWORD=mypassword ubuntu/redis:6.2-22.04_beta
Access your Redis 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). To enable TLS mode, comment the port 6379 line and uncomment the # port 0 and # tls-port 6379 lines. |
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-network
$ docker network connect redis-network redis-container
$ docker run -it --rm --network redis-network ubuntu/redis:6.2-22.04_beta redis-cli -h redis-container
Now you can:
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 snap alias microk8s.kubectl kubectl
.
Download
redis.conf and
redis-deployment.yml and set containers.redis.image
in redis-deployment.yml
to your chosen channel tag (e.g. ubuntu/redis:6.2-22.04_beta
), then:
kubectl create configmap redis-config --from-file=redis=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: <issue summary>
". Make sure to include the digest of the image you are using, from:
docker images --no-trunc --quiet ubuntu/redis:<tag>
These channels (tags) are not updated anymore. Please upgrade to newer channels, or reach out if you can't upgrade.
Track | Version | EOL | Upgrade Path |
---|---|---|---|
Redis™ software 6.0.15 on Ubuntu 21.10 | 07/2022 | 6.2-22.04_beta | |
Redis™ software 6.0.11 on Ubuntu 21.04 | 01/2022 | ||
Redis™ software 5.0.7 on Ubuntu 20.04 LTS | 01/2021 | ||
track |
docker pull ubuntu/redis