In my case, I installed the ssmtp package on my Unix based host. For some reason, the best way in my situation is to use ssmtp binary (under / usr / sbin) on my host to send mail (html file) in my APP container.
I am trying to set the host directory / usr / bin to a container:
docker run -v /usr/sbin:/host_sbin --name=myapp -ti -p 889:80 -p 890:5432 myimage
and try ssmtp, here are some uncomfortable attempts and their results:
In the APP container and in / host_sbin
ssmtp ---> bash: ssmtp: command not found ./ssmtp ---> bash: ./ssmtp: No such file or directory
So, it seems that everything is not as simple as I think. Can anyone do something like this to share with me? And I would appreciate it if someone could explain to me why this is not working.
source share