version : '3' services: mysql_service: image: 192.168.31.11/library/mysql:5.7 container_name: mysql_service environment: - "MYSQL_ROOT_PASSWORD=yzcxzsa@1234567" - "MYSQL_DATABASE=lepu_test_platform" - "MYSQL_ROOT_HOST=%" ports: - "3316:3306" volumes: - ./my.cnf:/etc/mysql/my.cnf - $MYSQL_DIR/mysql:/var/lib/mysql command: - [ 'mysqld', '--innodb-buffer-pool-size=20M', '--character-set-server=utf8', '--collation-server=utf8_general_ci', '--default-time-zone=+8:00', '--lower-case-table-names=1' ] command: --default-authentication-plugin=mysql_native_password restart: always networks: - net-spring-db networks: net-spring-db: driver: bridge