docker redis 设置密码

version: "3"
services: 
  redis:
    image: redis
    container_name: redis
    ports: 
      - 6379:6379
    command: redis-server --requirepass 123456
  php: 
    restart: always
    image: registry.cn-hangzhou.aliyuncs.com/php_public/php 
    container_name: php 
    volumes: 
    - ./nginx/www:/var/www/html
    - ./php_conf:/usr/local/etc/php/conf.d
    links: 
      - redis:redis
    stdin_open: true
    tty: true
  nginx: 
    restart: always
    image: nginx
    links:
      - php
    ports: 
    - 80:80
    volumes: 
    - ./nginx/www:/usr/share/nginx/html:ro
    - ./nginx/conf/conf.d:/etc/nginx/conf.d:ro

  

posted @ 2020-12-07 11:16  酷酷的城池  阅读(842)  评论(0编辑  收藏  举报