Docker without Data path - where are the files?


Recommended Posts

Cheers everyone!

 

As a total Docker Noob, I'm in the process of setting up a SMTP Relay Docker (https://hub.docker.com/r/juanluisbaptiste/postfix/).

I've successfully set it up, and it's working just fine out of the box, BUT: I didn't set any data path.

 

Reading the logs, Postfix is reading files in /dev/ as well as /etc/postfix.

 

Where are those files stored, directly inside the image? Is it okay to keep it like this, or would it be best practice to mount those paths to an appdata folder?

 

Thanks in advance!

Link to comment
3 hours ago, Turnspit said:

Where are those files stored, directly inside the image? Is it okay to keep it like this, or would it be best practice to mount those paths to an appdata folder?

 

Any path not explicitly mounted is stored within the image.  If you don't map them outside, then the downsides are that any time an update to the container is done, the contents will be lost. (along with if you ever have to recreate the image)

  • Like 1
Link to comment

Thanks for the info Squid. 🙂

 

Since this specific Docker image is pulling all its relevant informations from env-variables, this shouldn't be a problem.

 

Still wondering though - I tried mounting /etc to a folder in /appdata, and while the were some files created, some curcial files were missing (or not created) and postfix had problems starting and terminated after a couple of tries.

 

For example:

postconf: fatal: open /etc/postfix/main.cf: No such file or directory

Edited by Turnspit
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.