When I view it in the running container: relayhost =
I have even tried modifying the line and removed the ‘[]’
and then rebuilding the image but the running container still ends up with the same problem. I can change any other line, add comments,etc and they get reflected correctly. I feel like I am missing something simple here.
Yep, CP from host to container after container is running is correct. However if I shut the container down (docker-compose down) and restart it it and view it the line is incorrect.
I think I know why it is appearing the way it is but I don't know how to fix it. If I view the main.cf file without copying my file into the container it has that line 'relayhost = '. So my guess is that when I am copying file file into the container that docker only copies in lines that don't exist. Does that sound correct? and if so how do I change that behavior?Also how do I get this silly editor to ignore the fact that ‘maindotcf’ is not a domain name? It won’t let me post anything with more that what it thinks are 2 links because I am new, or it thinks that it is a bogus URL.
makes no sense… but change the file, add a space and save it on the host… IF there is caching, then it will have changed and need to be copied again. then rebuild the image
It’s not using the cached version, I have changed several lines and moved them around in different orders and every other line that I change gets reflected in the container except this one. The only thing I can figure is that all other lines that I am copying in the file do not already exist and apparently it won’t overwrite a line that does. Is there anyway that I can delete that file in the container before I copy in the new file?
I think the problem is that the maindotcf file is automatically populated through the postfix install so I don’t want to delete the entire image just that one file since docker doesn’t seem to want to let me overwrite it using the ‘copy’ command.
postfx install — I don’t see that in the dockerfile
do the copy AFTER the postfix install, with cmd or as part of the entrypoint script.
copy it someplace temporarily in the build phase, then do the install, then copy the file over…
and I bet you can cat it from the temporary place at it will be fine
you left that little postfix install step out of all the prior info…
I am using jasonrivers/nagios:latest as FROM in my docker file and the only thing that my docker file is doing is exposing a port and copying those 2 files. So the files are being copied as the very last step. I guess I am going to have to edit the jasonrivers/nagios:latest docker file. I even tried running a RUN rm maindotcf before the copy commands and it didn’t complain when I built the image but it still didn’t work.