{"id":16540501,"url":"https://github.com/sameersbn/docker-redis","last_synced_at":"2025-04-09T22:17:12.577Z","repository":{"id":16197439,"uuid":"18944154","full_name":"sameersbn/docker-redis","owner":"sameersbn","description":"Dockerfile to create a Docker container image for Redis.","archived":false,"fork":false,"pushed_at":"2021-07-26T10:07:35.000Z","size":72,"stargazers_count":156,"open_issues_count":8,"forks_count":140,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T22:17:05.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameersbn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-19T15:32:53.000Z","updated_at":"2025-03-22T19:27:36.000Z","dependencies_parsed_at":"2022-09-11T16:10:55.119Z","dependency_job_id":null,"html_url":"https://github.com/sameersbn/docker-redis","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameersbn","download_url":"https://codeload.github.com/sameersbn/docker-redis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119287,"owners_count":21050755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T18:52:37.903Z","updated_at":"2025-04-09T22:17:12.555Z","avatar_url":"https://github.com/sameersbn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Circle CI](https://circleci.com/gh/sameersbn/docker-redis.svg?style=shield)](https://circleci.com/gh/sameersbn/docker-redis) [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/redis/status \"Docker Repository on Quay.io\")](https://quay.io/repository/sameersbn/redis)\n\n# sameersbn/redis\n\n- [Introduction](#introduction)\n  - [Contributing](#contributing)\n  - [Issues](#issues)\n- [Getting started](#getting-started)\n  - [Installation](#installation)\n  - [Quickstart](#quickstart)\n  - [Command-line arguments](#command-line-arguments)\n  - [Persistence](#persistence)\n  - [Authentication](#authentication)\n  - [Logs](#logs)\n- [Maintenance](#maintenance)\n  - [Upgrading](#upgrading)\n  - [Shell Access](#shell-access)\n\n# Introduction\n\n`Dockerfile` to create a [Docker](https://www.docker.com/) container image for [Redis](http://redis.io/).\n\nRedis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.\n\n## Contributing\n\nIf you find this image useful here's how you can help:\n\n- Send a pull request with your awesome features and bug fixes\n- Help users resolve their [issues](../../issues?q=is%3Aopen+is%3Aissue).\n- Support the development of this image with a [donation](http://www.damagehead.com/donate/)\n\n## Issues\n\nBefore reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker [installation guide](https://docs.docker.com/installation) for instructions.\n\nSELinux users should try disabling SELinux using the command `setenforce 0` to see if it resolves the issue.\n\nIf the above recommendations do not help then [report your issue](../../issues/new) along with the following information:\n\n- Output of the `docker version` and `docker info` commands\n- The `docker run` command or `docker-compose.yml` used to start the image. Mask out the sensitive bits.\n- Please state if you are using [Boot2Docker](http://www.boot2docker.io), [VirtualBox](https://www.virtualbox.org), etc.\n\n# Getting started\n\n## Installation\n\nAutomated builds of the image are available on [Dockerhub](https://hub.docker.com/r/sameersbn/redis) and is the recommended method of installation.\n\n\u003e **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/redis)\n\n```bash\ndocker pull sameersbn/redis:4.0.9-2\n```\n\nAlternatively you can build the image yourself.\n\n```bash\ndocker build -t sameersbn/redis github.com/sameersbn/docker-redis\n```\n\n## Quickstart\n\nStart Redis using:\n\n```bash\ndocker run --name redis -d --restart=always \\\n  --publish 6379:6379 \\\n  --volume /srv/docker/redis:/var/lib/redis \\\n  sameersbn/redis:4.0.9-2\n```\n\n*Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)*\n\n## Command-line arguments\n\nYou can customize the launch command of Redis server by specifying arguments to `redis-server` on the `docker run` command. For example the following command will enable the Append Only File persistence mode:\n\n```bash\ndocker run --name redis -d --restart=always \\\n  --publish 6379:6379 \\\n  --volume /srv/docker/redis:/var/lib/redis \\\n  sameersbn/redis:4.0.9-2 --appendonly yes\n```\n\nPlease refer to http://redis.io/topics/config for further details.\n\n## Persistence\n\nFor Redis to preserve its state across container shutdown and startup you should mount a volume at `/var/lib/redis`.\n\n\u003e *The [Quickstart](#quickstart) command already mounts a volume for persistence.*\n\nSELinux users should update the security context of the host mountpoint so that it plays nicely with Docker:\n\n```bash\nmkdir -p /srv/docker/redis\nchcon -Rt svirt_sandbox_file_t /srv/docker/redis\n```\n\n## Authentication\n\nTo secure your Redis server with a password, specify the password in the `REDIS_PASSWORD` variable while starting the container.\n\n```bash\ndocker run --name redis -d --restart=always \\\n  --publish 6379:6379 \\\n  --env 'REDIS_PASSWORD=redispassword' \\\n  --volume /srv/docker/redis:/var/lib/redis \\\n  sameersbn/redis:4.0.9-2\n```\n\nClients connecting to the Redis server will now have to authenticate themselves with the password `redispassword`.\n\nAlternatively, the same can also be achieved using the [Command-line arguments](#command-line-arguments) feature to specify the `--requirepass` argument.\n\n## Logs\n\nBy default the Redis server logs are sent to the standard output. Using the [Command-line arguments](#command-line-arguments) feature you can configure the Redis server to send the log output to a file using the `--logfile` argument:\n\n```bash\ndocker run --name redis -d --restart=always \\\n  --publish 6379:6379 \\\n  --volume /srv/docker/redis:/var/lib/redis \\\n  sameersbn/redis:4.0.9-2 --logfile /var/log/redis/redis-server.log\n```\n\nTo access the Redis logs you can use `docker exec`. For example:\n\n```bash\ndocker exec -it redis tail -f /var/log/redis/redis-server.log\n```\n\n# Maintenance\n\n## Upgrading\n\nTo upgrade to newer releases:\n\n  1. Download the updated Docker image:\n\n  ```bash\n  docker pull sameersbn/redis:4.0.9-2\n  ```\n\n  2. Stop the currently running image:\n\n  ```bash\n  docker stop redis\n  ```\n\n  3. Remove the stopped container\n\n  ```bash\n  docker rm -v redis\n  ```\n\n  4. Start the updated image\n\n  ```bash\n  docker run --name redis -d \\\n    [OPTIONS] \\\n    sameersbn/redis:4.0.9-2\n  ```\n\n## Shell Access\n\nFor debugging and maintenance purposes you may want access the containers shell. If you are using Docker version `1.3.0` or higher you can access a running containers shell by starting `bash` using `docker exec`:\n\n```bash\ndocker exec -it redis bash\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameersbn%2Fdocker-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-redis/lists"}