Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

docker-redis

Installation

  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull recipediary/redis

Source

Usage

Build

docker build --rm -t recipediary/redis .

Run redis-server

docker run -d \
  --name redis \
  --restart=always \
  -p 6379:6379 \
  recipediary/redis

Run redis-server with persistent data directory. (creates dump.rdb)

docker run -d \
  --name redis
  -p 6379:6379 \
  -v <data-dir>:/data \
  recipediary/redis

Run redis-server with persistent data directory and password.

docker run -d \
  --name redis \
  -p 6379:6379 \
  -v <data-dir>:/data \
  recipediary/redis redis-server /etc/redis/redis.conf --requirepass <password>

Run redis-cli

docker run -it --rm \
  --link redis:redis \
  recipediary/redis bash -c 'redis-cli -h redis'

Run backup-disk

docker run -it --rm  \
  --volumes-from redis \
  --link redis:redis \
  -v $(pwd):/backup \
  recipediary/redis bash -c 'cp dump.rdb /backup/dump.$(date "+%b_%d_%Y").rdb'
Docker Pull Command
Owner
recipediary
Source Repository