I've created mysql docker container using docker-compose. I built the container and created some tables in mysql. But, when i restarted my computer, i lost my data (tables and data) in mysql. I'am using a local folder in container as a volume. But i see that it's not mounted in virtual container.
My OS is Windows 10 Pro. I've tried to restart the Docker desktop and the containers, but it did not help. Here is the .yml that i'm running:
version: '3.3'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'db_name'
MYSQL_USER: 'db_user'
MYSQL_PASSWORD: 'db_pass'
MYSQL_ROOT_PASSWORD: 'db_root_pass'
ports:
- '3308:3306'
volumes:
- ./mysql-log:/var/log/mysql
- ./dbdata:/var/lib/mysql
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']