Merge ~valentinviennot/ubuntu-docker-images:update-redis-readme-app-description into ~ubuntu-docker-images/ubuntu-docker-images/+git/redis:edge

Proposed by Valentin Viennot
Status: Merged
Merged at revision: fa69382de83d6c645808f27a8a06e47a3ff93310
Proposed branch: ~valentinviennot/ubuntu-docker-images:update-redis-readme-app-description
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/redis:edge
Diff against target: 74 lines (+10/-22)
1 file modified
README.md (+10/-22)
Reviewer Review Type Date Requested Status
Richard Harding (community) Approve
Review via email: mp+393877@code.launchpad.net

Description of the change

Did some cleaning/consistency work, added extra params, and my dear TZ variable. Please leave comments and don't hesitate to discuss the choices made here.

To post a comment you must log in.
Revision history for this message
Richard Harding (rharding) :
review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/README.md b/README.md
index ba45320..ef2ca35 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
22
3## About Redis3## About Redis
44
5"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. [Learn more](https://redis.io/topics/introduction)." (from [redis.io](redis.io))
56
6## Tags7## Tags
78
@@ -16,21 +17,21 @@
16### Docker CLI17### Docker CLI
1718
18```sh19```sh
19$ docker run --name redis -e ALLOW_EMPTY_PASSWORD=yes squeakywheel/redis:edge20$ docker network create --driver bridge redis-network
21$ docker run --name redis-container --network redis-network -e TZ=Europe/London -e REDIS_PASSWORD=mypassword squeakywheel/redis:edge
20```22```
2123
22**WARNING**: use of `ALLOW_EMPTY_PASSWORD=yes` is not
23recommended in production environments. For production environments specify the `REDIS_PASSWORD` environment variable, or instruct the entrypoint script to create a random password for you by specifying `REDIS_RANDOM_PASSWORD=1`.
24
25
26#### Parameters24#### Parameters
27| Parameter | Description |25| Parameter | Description |
28|---|---|26|---|---|
27| `-e TZ` | Timezone, e.g. `Europe/London` |
29| `-e ALLOW_EMPTY_PASSWORD` | Set to `yes` to allow connections to `redis-server` without a password. **This setting is not recommended in production environments**. |28| `-e ALLOW_EMPTY_PASSWORD` | Set to `yes` to allow connections to `redis-server` without a password. **This setting is not recommended in production environments**. |
30| `-e REDIS_PASSWORD` | Set the desired password to be used |29| `-e REDIS_PASSWORD` | Set the desired password to be used |
31| `-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`) |30| `-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`) |
32| `-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).31| `-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)
33| `-e REDIS_EXTRA_FLAGS` | Specify extra flags to be passed to `redis-server` when initializing it |32| `-e REDIS_EXTRA_FLAGS` | Specify extra flags to be passed to `redis-server` when initializing it |
33| `-p 6079:6379` | Expose redis on `localhost:6079` |
34| `-v /path/to/redis.conf:/etc/redis/redis.conf` | Mount local [configuration file](https://redis.io/topics/config) `redis.conf` (download this [example file](https://git.launchpad.net/~canonical-server/ubuntu-server-oci/+git/memcached/plain/examples/redis.conf)) |
3435
3536
36#### Testing/Debugging37#### Testing/Debugging
@@ -41,23 +42,8 @@ In case you need to debug what it is happening with the container you can run `d
41$ docker exec -it <name_of_the_container> /bin/bash42$ docker exec -it <name_of_the_container> /bin/bash
42```43```
4344
44You can specify your own `redis.conf` such as this [example](https://git.launchpad.net/~canonical-server/ubuntu-server-oci/+git/memcached/plain/examples/redis.conf) file by mounting it:45With this same image, you can launch another container with the `redis-cli` program,
45
46```
47$ docker run -d --name redis /myredis/redis.conf:/etc/redis/redis.conf -e ALLOW_EMPTY_PASSWORD=yes squeakywheel/redis:edge
48```
49
50
51If you want, you can launch another container with the `redis-cli` program,
52and connect to the `redis-server` that is running in the first container.46and connect to the `redis-server` that is running in the first container.
53For example, suppose that you already have a docker network named
54`redis-network` configured, and you launch `redis-server` like this:
55
56```
57$ docker run --network redis-network --name redis-container -e REDIS_PASSWORD=mypassword -d squeakywheel/redis:edge
58```
59
60You can now launch `redis-cli` by doing:
6147
62```48```
63$ docker run --network redis-network --rm squeakywheel/redis:edge redis-cli -h redis-container49$ docker run --network redis-network --rm squeakywheel/redis:edge redis-cli -h redis-container
@@ -140,6 +126,8 @@ spec:
140$ microk8s kubectl apply -f redis-deployment.yml126$ microk8s kubectl apply -f redis-deployment.yml
141```127```
142128
129You will now be able to connect to the redis server on `localhost:30073`.
130
143## Bugs and Features request131## Bugs and Features request
144132
145If you find a bug in our image or want to request a specific feature file a bug here:133If you find a bug in our image or want to request a specific feature file a bug here:

Subscribers

People subscribed via source and target branches