mariadb docker on raspberry
Does the following work?

docker-compose exec mariadb /usr/bin/mysql -u &lt;your_db_username&gt; --password=&lt;your_db_password&gt; &lt; your_db_backup.sql


Note: mariadb is the name of your container.

Edit: I realize I'm using docker-compose. So I'm not entirely sure if this would work with just a Dockerfile.