Yes, it is possible. I had to modify my MariaDB config to allow connections from the network since the container has another IP so it looks like it is coming from another machine.
Details on how to configure your docker seafile to use your existing MariaDB instance can be found in this document.