Commit 450090c4 by Antonio De Marinis

add info about using host /etc/localtime

parent c45639c8
...@@ -15,17 +15,19 @@ The `.secrets` file should be used as a runtime environment variables, to set th ...@@ -15,17 +15,19 @@ The `.secrets` file should be used as a runtime environment variables, to set th
Basic way to get one instance up and running: Basic way to get one instance up and running:
docker run --rm -t -i --env-file=.secret --name=postfix eeacms/postfix docker run --rm -t -i --env-file=.secret -v /etc/localtime:/etc/localtime:ro --name=postfix eeacms/postfix
From the application container, running on the same docker host, one can set the SMTP server to the postfix container address. From the application container, running on the same docker host, one can set the SMTP server to the postfix container address.
Using the mount directive ```-v /etc/localtime:/etc/localtime:ro``` will make sure that the postfix container will share same timezone as the host, so that the emails have correct date and timestamps.
## Example usage ## Example usage
In the `example` folder, there is an example centos container than can be used to test connectivity. In the `example` folder, there is an example centos container than can be used to test connectivity.
cd example cd example
docker build -t example . docker build -t example .
docker run --rm -it --link=postfix:postfixcontainer example docker run --rm -it -v /etc/localtime:/etc/localtime:ro --link=postfix:postfixcontainer example
# from commandline: # from commandline:
$ mail test@example.com $ mail test@example.com
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment