Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mounting volumes does not change container files #49

Closed
Sigurthorb opened this issue Jan 9, 2016 · 3 comments
Closed

Mounting volumes does not change container files #49

Sigurthorb opened this issue Jan 9, 2016 · 3 comments

Comments

@Sigurthorb
Copy link

I am playing around with the postfix folder and trying to change sasl/smtpd.conf file but the files in the container are not loaded to the /etc/postfix folder.

In the readme.md there is noted that all folders (expect letsencrypt) need to be mounted to the tmp folder.

files must be mounted to /tmp in your container

To make changes I need to rebuild the image with the changed code in the git project folder

my docker-compose file:

mail:
  restart: always
  #image: tvial/docker-mailserver
  build: ./docker-mailserver
  hostname: mail
  domainname: host.com
  ports:
  - "25:25"
  - "143:143"
  - "587:587"
  - "993:993"
  volumes:
  - ./spamassassin:/tmp/spamassassin/
  - ./postfix:/tmp/postfix/
  - /etc/letsencrypt:/etc/letsencrypt
  environment:
  - DMS_SSL=letsencrypt
@tomav
Copy link
Contributor

tomav commented Jan 9, 2016

You don't need to rebuild, but restart the container.
Some files are generated at startup.
You should have a look to https://github.com/tomav/docker-mailserver/blob/master/start-mailserver.sh to understand how it works.

I use git to pull new configuration and then I docker-compose up -d mail to restart it using the new config.

@tomav tomav added the question label Jan 9, 2016
@Sigurthorb
Copy link
Author

Ahh I see. I thought the start-mailserver.sh was a part of the image it self. I'll have a look at it.
Thank you

@tomav
Copy link
Contributor

tomav commented Jan 9, 2016

Let me know if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants