I would like to run a bash script to set some values but I am unsure how best to do this. I guess I could add the script to run to my bashrc file but that seems wrong.
I am very new to docker and am trying to get my head around it, I am used to running Linux and am struggling to get my head around having separate containers running different services and how they talk to each other:-)
I need to set up a way of emailing logs and errors when running python code.
I can build a container with Ubuntu and mailutls postfix etc but need to specify the sender email so I can filter it, I have done this using the postfix generic file which the script I want to run at startup sets using $HOSTNAME to catch the root@$HOSTNAME and set a email of my choosing.
Thing is what is the best way to run this script and keep the container running so I can run docker exec and still bash into the container?
The other thing that I am wondering is as I start the container on my desktop and control it, can I not just point my container to use the smtp/Postfix setup on my machine through some port trickery? I would still have a setup script problem but I wonder if this is a better idea.