其他分享
首页 > 其他分享> > docker-compose.yml

docker-compose.yml

作者:互联网

version: '3.7'
services:
  #mysql
  #服务名,自定义
  mysql:
    image: mysql:5.7.25
    container_name: mysql
    restart: always
    volumes:
      - /tmp/mysql/conf/hmy.cnf:/etc/mysql/conf.d/hmy.cnf
      - /tmp/mysql/data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
    ports:
      - 3306:3306

  redis:
    image: redis:6.2.4
    container_name: redis
    restart: always
    ports:
      - 6379:6379

 

标签:tmp,compose,image,redis,conf,mysql,3306,docker,yml
来源: https://www.cnblogs.com/linxiaofeng/p/16696141.html