Giter Site home page Giter Site logo

docker-alpine-redis's Introduction

build status

docker/alpine-redis:4.0.11

Docker image for redis server with optional sentinel.

Introduction

Docker image for running Redis, image is based upon Alpine Linux.

Redis 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.

Docker Registries

  • datacore/alpine-redis:latest (DockerHub)
  • registry.timmertech.nl/docker/alpine-redis:latest (registry.timmertech.nl)

Source Repositories

Installation

Install from DockerHub

Download:

docker pull datacore/alpine-redis:latest

Build:

docker build -t datacore/docker-alpine-redis https://github.com/GJRTimmer/docker-alpine-redis

Install from timmertech

Download:

docker pull registry.timmertech.nl/docker/alpine-redis:latest

Build:

docker build -t datacore/docker-alpine-redis https://gitlab.timmertech.nl/docker/alpine-redis

Examples

Locations

Default(s):

Type Default
Redis Port 6379
Sentinel Port 26379
Data /var/lib/redis
Log(s) /var/log/redis
Unix Socket /var/run/redis/redis.sock

General Configuration

Option Default Description
REDIS 1 / true Activate Redis Server
SENTINEL 0 / false Activate Redis Sentinel
USERMAP_UID redis Map ownership to UID
USERMAP_GID redis Map ownership to GID

Redis Configuration

Option Default Description
REDIS 1 / true Activate Redis Server
REDIS_TIMEOUT 0 Close the connection after a client is idle for N seconds (0 to disable)
REDIS_KEEPALIVE 300 TCP keepalive.

If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
of communication. This is useful for two reasons:

1) Detect dead peers.
2) Take the connection alive from the point of view of network
equipment in the middle.

On Linux, the specified value (in seconds) is the period used to send ACKs.
Note that to close the connection the double of the time is needed.
On other kernels the period depends on the kernel configuration.

A reasonable value for this option is 300 seconds, which is the new
Redis default starting with Redis 3.2.1.
REDIS_DATABASES 16 Number of redis databases
REDIS_DATA /var/lib/redis Data directory of redis
REDIS_PASSWORD - Redis password
REDIS_MAXCLIENTS 10000 Max connected clients
REDIS_MIN_SLAVES_TO_WRITE 1 It is possible for a master to stop accepting writes if there are less than
N slaves connected, having a lag less or equal than M seconds.
REDIS_MIN_SLAVES_MAX_LAG 10 It is possible for a master to stop accepting writes if there are less than
N slaves connected, having a lag less or equal than M seconds.

Slave Configuration

Option Default Required Description
SLAVE 0 - Mark redis server as slave
SLAVE_MHOST - Yes IP of master server
SLAVE_MPORT 6379 No Port of the master redis server
SLAVE_MPASS - No Password of the master redis server
SLAVE_IP - No Publish IP of slave, used for docker NAT, IP is the docker host IP to reach container, uses redis slave-announce-ip
SLAVE_PORT - No Publish port of slave, used for docker, PORT is the docker host port to reach container, uses redis slave-announce-port

Sentinel Configuration

Option Default Required Description
SENTINEL 0 - Activate redis-server sentinel
SENTINEL_IP - No Publish IP of sentinel, used for docker NAT, IP is the docker host IP to reach container, uses sentinel announce-ip
SENTINEL_PORT - No Publish IP of sentinel, used for docker NAT, PORT is the docker host PORT to reach container, uses sentinel announce-ip
SENTINEL_MSET - Yes Name of master set
SENTINEL_MHOST - Yes IP of master redis
SENTINEL_MPORT 6379 No Port of master redis server
SENTINEL_MPASS - No Password of master redis server
SENTINEL_QUORUM - Yes Quorum voting value
SENTINEL_DOWN_AFTER_MS 30000 No Number of milliseconds the master (or any attached slave or sentinel) should
be unreachable (as in, not acceptable reply to PING, continuously, for the
specified period) in order to consider it in S_DOWN state (Subjectively
Down).

Default is 30 seconds.
SENTINEL_PARALLEL_SYNCS 1 No How many slaves we can reconfigure to point to the new slave simultaneously
during the failover. Use a low number if you use the slaves to serve query
to avoid that all the slaves will be unreachable at about the same
time while performing the synchronization with the master.
SENTINEL_FAILOVER_TIMEOUT 180000 No Specifies the failover timeout in milliseconds. It is used in many ways:

- The time needed to re-start a failover after a previous failover was
already tried against the same master by a given Sentinel, is two
times the failover timeout.

- The time needed for a slave replicating to a wrong master according
to a Sentinel current configuration, to be forced to replicate
with the right master, is exactly the failover timeout (counting since
the moment a Sentinel detected the misconfiguration).

- The time needed to cancel a failover that is already in progress but
did not produced any configuration change (SLAVEOF NO ONE yet not
acknowledged by the promoted slave).

- The maximum time a failover in progress waits for all the slaves to be
reconfigured as slaves of the new master. However even after this time
the slaves will be reconfigured by the Sentinels anyway, but not with
the exact parallel-syncs progression as specified.

Default is 3 minutes.

docker-alpine-redis's People

Contributors

gjrtimmer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.