Run SQL script in maria/mysql db container Run this script from your local machine, docker exec -i CONTAINER_ID sh -c \ 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" YOUR_DATABASE' \ < your_file.sql