使用docker-compose 安装Redis最新版,并且设置密码

直接上docker-compose.yml。

version: '2'

networks:
  app-tier:
    driver: bridge

services:
  redis:
    container_name: 'redis'
    image: 'redis'
    restart: always
    networks:
      - app-tier
    ports:
      - 6999:6379
    command: redis-server --port 6379 --requirepass password  --appendonly yes

Docker,docker-compose ,安装见

https://blog.csdn.net/qq625281334/article/details/98749227

你可能感兴趣的:(Docker)