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
Content type
Image
Digest
Size
36.4 MB
Last updated
about 6 years ago
docker pull lingting2020/redis:rc-6.0