HUB
Sign inSign up
redis logo

webkutir/redis

By webkutir

•Updated 21 days ago

Docker image for Redis 7.4.12 on Alpine. A password is required, and append-only persistence is on.

Image
Databases & storage
0

104

webkutir/redis repository overview

⁠webkutir/redis

Redis 7.4.12 for a private Docker network. The image is redis:7.4.12-alpine with an entrypoint that refuses to start until REDIS_PASSWORD is set.

The password is read at startup and written into /tmp/redis.conf. It is not stored in the image. The file is mode 600 and contains:

  • appendonly yes
  • requirepass from REDIS_PASSWORD
  • protected-mode yes
  • bind 0.0.0.0
  • port 6379

Mount a volume on /data so the append-only file survives a restart. Changing REDIS_PASSWORD and restarting the container replaces the password in that config.

Keep port 6379 on the Docker network. This image listens on every interface inside the container, so do not publish 6379 on a public host address.

services:
  redis:
    image: webkutir/redis:7.4.12
    restart: unless-stopped
    environment:
      REDIS_PASSWORD: change-me
    volumes:
      - redis_data:/data
    networks:
      app-net:
        ipv4_address: 10.0.0.6
    healthcheck:
      test: ["CMD-SHELL", "redis-cli --no-auth-warning -a \"$$REDIS_PASSWORD\" ping | grep -q PONG"]
      interval: 10s
      timeout: 3s
      retries: 5

networks:
  app-net:
    ipam:
      config:
        - subnet: 10.0.0.0/24

volumes:
  redis_data:

A client on that network connects with the same password:

redis-cli -h 10.0.0.6 -a change-me ping

In this mail stack the container is the Bayes store for Rspamd. Point Rspamd at 10.0.0.6:6379 and give it the same REDIS_PASSWORD.

Tag summary
Recent tags
Content type
Image
Digest
sha256:33f3fd384…
Size
15.7 MB
Last updated
21 days ago
docker pull webkutir/redis:latest