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
1diff --git a/README.md b/README.md
2index ba45320..ef2ca35 100644
3--- a/README.md
4+++ b/README.md
5@@ -2,6 +2,7 @@
6
7 ## About Redis
8
9+"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))
10
11 ## Tags
12
13@@ -16,21 +17,21 @@
14 ### Docker CLI
15
16 ```sh
17-$ docker run --name redis -e ALLOW_EMPTY_PASSWORD=yes squeakywheel/redis:edge
18+$ docker network create --driver bridge redis-network
19+$ docker run --name redis-container --network redis-network -e TZ=Europe/London -e REDIS_PASSWORD=mypassword squeakywheel/redis:edge
20 ```
21
22-**WARNING**: use of `ALLOW_EMPTY_PASSWORD=yes` is not
23-recommended 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 #### Parameters
27 | Parameter | Description |
28 |---|---|
29+| `-e TZ` | Timezone, e.g. `Europe/London` |
30 | `-e ALLOW_EMPTY_PASSWORD` | Set to `yes` to allow connections to `redis-server` without a password. **This setting is not recommended in production environments**. |
31 | `-e REDIS_PASSWORD` | Set the desired password to be used |
32 | `-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`) |
33-| `-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).
34+| `-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)
35 | `-e REDIS_EXTRA_FLAGS` | Specify extra flags to be passed to `redis-server` when initializing it |
36+| `-p 6079:6379` | Expose redis on `localhost:6079` |
37+| `-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)) |
38
39
40 #### Testing/Debugging
41@@ -41,23 +42,8 @@ In case you need to debug what it is happening with the container you can run `d
42 $ docker exec -it <name_of_the_container> /bin/bash
43 ```
44
45-You 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:
46-
47-```
48-$ docker run -d --name redis /myredis/redis.conf:/etc/redis/redis.conf -e ALLOW_EMPTY_PASSWORD=yes squeakywheel/redis:edge
49-```
50-
51-
52-If you want, you can launch another container with the `redis-cli` program,
53+With this same image, you can launch another container with the `redis-cli` program,
54 and connect to the `redis-server` that is running in the first container.
55-For example, suppose that you already have a docker network named
56-`redis-network` configured, and you launch `redis-server` like this:
57-
58-```
59-$ docker run --network redis-network --name redis-container -e REDIS_PASSWORD=mypassword -d squeakywheel/redis:edge
60-```
61-
62-You can now launch `redis-cli` by doing:
63
64 ```
65 $ docker run --network redis-network --rm squeakywheel/redis:edge redis-cli -h redis-container
66@@ -140,6 +126,8 @@ spec:
67 $ microk8s kubectl apply -f redis-deployment.yml
68 ```
69
70+You will now be able to connect to the redis server on `localhost:30073`.
71+
72 ## Bugs and Features request
73
74 If 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