Docker-compose: Database is uninitialized

后端 未结 5 1337
轻奢々
轻奢々 2021-02-18 17:02

I have a problem with docker-compose and mysql:

docker-compose.yml

version: \'2\' 
  services:
   db:
    image: mysql
    volumes:
      - \"./sito/db/:         


        
5条回答
  •  旧巷少年郎
    2021-02-18 17:59

    I just wanted to point out something, if using docker run command in terminal and not docker-compose, this would be the command:

    docker run -e MYSQL_ROOT_PASSWORD=password mysql_image
    

    Just notice that it won't work if you put -e MYSQL_ROOT_PASSWORD=password after mysql_image

提交回复
热议问题