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

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM