Redis on Docker
docker pull quay.io/aptible/redis
This is an image conforming to the Aptible database specification. To run a server for development purposes, execute
docker create --name data quay.io/aptible/redis
docker run --volumes-from data -e PASSPHRASE=pass quay.io/aptible/redis --initialize
docker run --volumes-from data -P quay.io/aptible/redis
The first command sets up a data container named data
which will hold the configuration and data for the database. The second command creates a Redis instance with the passphrase of your choice. The third command starts the database server.
In addition to the standard Aptible database ENV variables, which may be specified when invoking this image with --initialize
, the following environment variables may be set at runtime (i.e., launching a container from the image without arguments):
Variable | Description |
---|---|
MAX_MEMORY |
Memory limit for Redis server (e.g., 100mb) |
latest
: Currently Redis 5.0-aof5.0
: Redis 5.0.3 w/ RDB persistence5.0-aof
: AOF+RDB persistence- `5.0-nordb: no persistennce
4.0
: Redis 4.0.12 w/ RDB persistence4.0-aof
: AOF+RDB persistence- `4.0-nordb: no persistennce
3.2
: Redis 3.2.12 w/ RDB persistence3.2-aof
: AOF+RDB persistence- `3.2-nordb: no persistennce
3.0
: Redis 3.0.7 w/ RDB persistence EOL3.0-aof
: AOF+RDB persistence- `3.0-nordb: no persistennce
2.8
: Redis 2.8.24 w/ RDB persistence EOL2.8-aof
: AOF+RDB persistence- `2.8-nordb: no persistennce
Tests are run as part of the Dockerfile
build. To execute them separately within a container, run:
bats test
Images are built and pushed to Docker Hub on every deploy. Because Quay currently only supports build triggers where the Docker tag name exactly matches a GitHub branch/tag name, we must run the following script to synchronize all our remote branches after a merge to master:
make sync-branches
To push the Docker image to Quay, run the following command:
make release
MIT License, see LICENSE for details.
Copyright (c) 2015 Aptible and contributors.