redis: 1.1.1 docker-redis



1. docker-compose yaml

version: '3'
services:
  redis:
    image: redis:3.2.12
    container_name: redis
    command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
    volumes:
      - "/path/to/redis/data:/data"
      - "/path/to/redis/log:/var/log/redis"
      - "/path/to/reids/redis.conf:/usr/local/etc/redis/redis.conf"

2. 配置注意点

3. 容器运行用户

redis 5.x镜像运行的用户是redis,其属主属组为999.1000

# root运行时
chown -R 999.1000 /path/to/dir/on/host/should/mounted/to/container

# rootless运行时
podman unshare chown -R 999.1000 /path/to/dir/on/host/should/mounted/to/container