What I tested was reserved. For example, I created a new table in mysql mirror database.
againdocker-compose up
Later, the previous table still exists.
But can’t understand, don’tdocker-compose up
Didn’t you regenerate the instance of the mirror?
YML can actually generate only one instance per Docker-Compose? To reset, the previous instance must be manually deleted
docker-compose up
The existing container will be used preferentially instead of recreating the container.The following methods can solve your problem:
docker-compose up -d --force-recreate
Use--force-recreate
You can force the container to be rebuilt (otherwise the container will only be rebuilt if the container configuration has changed)
docker-compose down
Stop all containers and delete the containers (so that they can be used next timedocker-compose up
When it will be a new container)