Im currently working on a Web interface for my personal mailserver and This requires me to work with two different containers: A PHP Container and a Mailserver container. Now Im using Docker-Mailserver (https://hub.docker.com/r/mailserver/docker-mailserver/) and Id like to be able to make Accounts and their Mailboxes within my Webinterface instead of using a bash script as it currently is. From what I understand this requires me to launch a script located within the Mailserver Container at /usr/local/bin thats named setup The problem now is How do I share /usr/local/bin with my PHP Container? The folder already exists so I cant just make a Volume (to my knowledge) and Im now stuck at a standstill. Oh and I do NOT have access to the directory that needs to be shared from host. It is one I can only find in the docker container.
As it stands Ive tried looking around the internet however so far Ive been unable to find anything very useful. Theres alot of articles about Volumes however these create a new folder and from what I know do not work with existing folders. Networking could work however I doubt it since it is a script that needs to be executed instead of just a regular file.