Home > other >  Docker -v mount host folder to the folder in the container
Docker -v mount host folder to the folder in the container

Time:09-22

Mount the folder
 docker run - t - name mysql - v/e/code/test/doc/docker - mysql replication/mysql - CNF/slave:/etc/mysql/conf., d - p 3307-3306 - e MYSQL_ROOT_PASSWORD='123456' - d mysql 

Enter the mysql container
 docker exec - it mysql bash 


See the corresponding file
Host directory `/e/code/test/doc/docker - mysql replication/mysql - CNF/slave ` under a slave. The CNF file

Mysql under the container is a slave. The CNF folder, what reason is this?
  • Related