From 05ce698812cce111e64e23ceba220a1bf9a560d4 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Mon, 3 Feb 2020 18:34:19 +0100 Subject: [PATCH 1/3] Update version of the base image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c76509d..493e2b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/f31/s2i-core:latest +FROM registry.fedoraproject.org/f30/s2i-core:latest # Redis image based on Software Collections packages # From 8018a310d21a0739a2b44e2aa13243bb10372889 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Mon, 3 Feb 2020 18:38:19 +0100 Subject: [PATCH 2/3] Remove obsoleted labels --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 493e2b0..198beb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ FROM registry.fedoraproject.org/f30/s2i-core:latest ENV NAME=redis \ VERSION=5 \ - RELEASE=1 \ ARCH=x86_64 ENV REDIS_VERSION=$VERSION \ @@ -33,8 +32,6 @@ LABEL summary="$SUMMARY" \ com.redhat.component="$NAME" \ name="$FGC/$NAME" \ version="$VERSION" \ - release="$RELEASE.$DISTTAG" \ - architecture="$ARCH" \ usage="docker run -d --name redis_database -p 6379:6379 $FGC/$NAME" \ maintainer="SoftwareCollections.org " From 0da1173d6f274ee16368ec3c587e5056dccc998a Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Tue, 4 Feb 2020 09:11:11 +0100 Subject: [PATCH 3/3] Update the README.md in the root --- README.md | 80 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 8f5cf3d..0772ce6 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,36 @@ -Redis Docker image +Redis 5 in-memory data structure store container image ==================== -This container image includes Dockerfile for Redis 3.2 Docker image. -Users can choose between RHEL and CentOS based images. +This container image includes Redis 5 in-memory data structure store for OpenShift and general usage. +Users can choose between RHEL, CentOS and Fedora based images. +The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/), +the CentOS images are available on [Docker Hub](https://hub.docker.com/r/centos/), +and the Fedora images are available in [Fedora Registry](https://registry.fedoraproject.org/). +The resulting image can be run using [podman](https://github.com/containers/libpod). -Dockerfile for CentOS is called Dockerfile, Dockerfile for RHEL is called -Dockerfile.rhel7. +Note: while the examples in this README are calling `podman`, you can replace any such calls by `docker` with the same arguments -Environment variables and volumes ----------------------------------- +Description +----------- -| Variable name | Description | -| :--------------------- | ----------------------------------------- | -| `REDIS_PASSWORD` | Password for the server access | +Redis 5 available as container, is an advanced key-value store. +It is often referred to as a data structure server since keys can contain strings, hashes, lists, +sets and sorted sets. You can run atomic operations on these types, like appending to a string; +incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; +or getting the member with highest ranking in a sorted set. In order to achieve its outstanding +performance, Redis works with an in-memory dataset. Depending on your use case, you can persist +it either by dumping the dataset to disk every once in a while, or by appending each command to a log. -TBD - -You can also set the following mount points by passing the `-v /host:/container:Z` flag to Docker. - -| Volume mount point | Description | -| :----------------------- | -------------------- | -| `/var/lib/redis/data` | Redis data directory | - -**Notice: When mouting a directory from the host into the container, ensure that the mounted -directory has the appropriate permissions and that the owner and group of the directory -matches the user UID or name which is running inside the container.** Usage ---------------------------------- +----- -For this, we will assume that you are using the `rhscl/redis-32-rhel7` image. +For this, we will assume that you are using the `rhel8/redis-5` image. If you want to set only the mandatory environment variables and not store the database in a host directory, execute the following command: ``` -$ docker run -d --name redis_database -p 6379:6379 rhscl/redis-32-rhel7 +$ podman run -d --name redis_database -p 6379:6379 rhel8/redis-5 ``` This will create a container named `redis_database`. Port 6379 will be exposed and mapped @@ -47,9 +43,43 @@ For protecting Redis data by a password, pass `REDIS_PASSWORD` environment varia to the container like this: ``` -$ docker run -d --name redis_database -e REDIS_PASSWORD=strongpassword rhscl/redis-32-rhel7 +$ podman run -d --name redis_database -e REDIS_PASSWORD=strongpassword rhel8/redis-5 ``` **Warning: since Redis is pretty fast an outside user can try up to 150k passwords per second against a good box. This means that you should use a very strong password otherwise it will be very easy to break.** + + +Environment variables and volumes +---------------------------------- + +**`REDIS_PASSWORD`** + Password for the server access + + +You can also set the following mount points by passing the `-v /host:/container:Z` flag to podman. + +**`/var/lib/redis/data`** + Redis data directory + + +**Notice: When mouting a directory from the host into the container, ensure that the mounted +directory has the appropriate permissions and that the owner and group of the directory +matches the user UID or name which is running inside the container.** + + +Troubleshooting +--------------- +Redis logs into standard output, so the log is available in the container log. The log can be examined by running: + + podman logs + + +See also +-------- +Dockerfile and other sources for this container image are available on +https://github.com/sclorg/redis-container. +In that repository you also can find another versions of Python environment Dockerfiles. +Dockerfile for CentOS is called `Dockerfile`, Dockerfile for RHEL7 is called `Dockerfile.rhel7`, +for RHEL8 it's `Dockerfile.rhel8` and the Fedora Dockerfile is called Dockerfile.fedora.