Docker and laradock, are installed in the win10 environment and restart after killing the docker process today. What should I do if I find that the database is gone?

docker is installed in the win10 environment. What if laradock, kills the docker process and restarts today and finds that the database is gone?

Mar.11,2021

if you start the database service with the docker container, you need to mount the database data to the host, otherwise each restart of the container will result in data loss.
you can use the-v parameter to mount the data directory / var/lib/mysql of mysql to a directory of the host, so that the data can be persisted.


docker ps -a // 
Menu