infracamp:redis)This container is build upon the official redis-container. But it offers two extensions:
See the examples below on how to use the container. The container will be rebuild daily (:testing) or weekly (:latest).
Make sure no ports are exposed to the outside world - no security configuration is available. It is considered for stack-inside use only.
| Environment Variable | default | description |
|---|---|---|
MEMORYLIMIT | 100mb | The total Memory Limit |
MAXMEMORY_POLICY | allkeys-lru | Remove key by last resource usage |
Example for your stack-file to spin up a memory only redis instance with 100mb memory limit.
No persistence to disk. Usage for caching / volatile data only.
services:
redis:
image: infracamp/redis
environment:
- PRESET=memory_only
- MEMORYLIMIT=500mb
The Memory is snapshotted at specified interval to the disk. RDB is very compact and very perfomant. But you might loose between two snapshots
| Environment Variable | default | description |
|---|---|---|
| `SNAPSHOT_INTERVAL | 60 | Make snapshot every 60 seconds |
Redis data is stored to
/datainside the container. Make sure you have a volume mounted there - otherwise the data will be lost after restart.
Example:
services:
redis:
image: infracamp/redis
environment:
- PRESET=rdb_snapshots
- MEMORYLIMIT=500mb
- SNAPSHOT_INTERVAL=30
volumes:
- redisVolume:/data
Content type
Image
Digest
Size
50.7 MB
Last updated
almost 7 years ago
docker pull infracamp/redis