In "What is a container?" the docker
docs show the following nifty image:
For my scenario I have only App A and App B; let's designate them Alice and Bob. How do Alice and Bob communicate, generally and specifically? Using the KISS principle, concretely I'm using MySQL
and BaseX
from the docker hub.
The notion being for an xquery
file residing on the host, which is then sent to the BaseX
container for execution. This specific query is actually SQL
, so the MySQL
container will need to be queried for the result.
Does this necessitate port forwarding or other networking approaches? Volumes? Does this require an additional compose file composed of, in turn, MySQL
and BaseX
?
No doubt there are many possible approaches. What's the most pragmatic, from a learning perspective? Conceptually light, with a gradual learning curve.
One approach seems to utilize bridge networking:
Taking advantage of the fact that the containers can see each other.
This doesn't seem to me related to REST
ful web services.
Looking at related questions, this might touch on a reverse proxy.