Make DockerEngine public?

Hello, I am new to docker, so apologies if this question has been asked before or this post isin the wrong place.

I am trying to work on a project which has a very minimalistic infrastructure design. The project uses Firebase’s functions to access with an app. These functions are bits of JS code that run to perform specific actions. What I am trying to do is create an instance of a docker container once an event has occurred within the app. I was wondering if it was possible to expose the daemons api interface so that it could be accessed by firebase (and googles servers) instead of having to write server side code to respond to the action. Is this possible?

Kind Regards,
Compgeek28

you can access the docker daemon via a TCP socket, if you bind it to one.
Then you could execute everything mentioned here:
https://docs.docker.com/engine/api/#api-example

But be aware, exposing the port to a public interface allows everybody to access. So if you do so, please also consider security issues.