Sign inSign up

lingting2020/redis

By lingting2020

•Updated about 6 years ago

redis基础镜像

Image
0

40

lingting2020/redis repository overview

⁠集群示例
⁠docker-compose.yml
version: '3'

services:
  rc1:
    tty: true
    image: lingting2020/redis:rc-6.0
    hostname: rc1
    container_name: rc1
    networks:
      rc:
        ipv4_address: 202.21.0.101
    environment:
      TZ: Asia/Shanghai
    volumes:
      - /etc/localtime:/etc/localtime
    ports:
      - 29001:6379
  rc2:
    tty: true
    image: lingting2020/redis:rc-6.0
    hostname: rc2
    container_name: rc2
    networks:
      rc:
        ipv4_address: 202.21.0.102
    environment:
      TZ: Asia/Shanghai
    volumes:
      - /etc/localtime:/etc/localtime
    ports:
      - 29002:6379
  rc3:
    tty: true
    image: lingting2020/redis:rc-6.0
    hostname: rc3
    container_name: rc3
    networks:
      rc:
        ipv4_address: 202.21.0.103
    environment:
      TZ: Asia/Shanghai
    volumes:
      - /etc/localtime:/etc/localtime
    ports:
      - 29003:6379

networks:
  rc:
    ipam:
      config:
        - subnet: 202.21.0.0/16
⁠启动成功后进入任意容器执行命令
redis-cli --cluster create  202.21.0.101:6379 202.21.0.102:6379 202.21.0.103:6379 --cluster-replicas 0

Tag summary

Content type

Image

Digest

Size

36.4 MB

Last updated

about 6 years ago

docker pull lingting2020/redis:rc-6.0