How to configure the 'smtp ' settings on docker/redmine container instance? How to configure the 'smtp ' settings on docker/redmine container instance? docker docker

How to configure the 'smtp ' settings on docker/redmine container instance?


You can modify configuration.yml by two ways:
1. use command
docker cp FILEPATH_IN_YOUR_HOST CONTAINER_ID:PATH_IN_YOUR_CONTAINER
eg. vi configuration.yml, then type in these codes:

 default:      email_delivery:        delivery_method: :smtp        smtp_settings:          address: "smtp.yourcompany.com"          port: 25

then docker cp configuration.yml redmine:/usr/src/redmine/config/configuration.yml
2. volumns
mapping the container's directory to your host path

docker run -d -p 10030:3000 -v /opt/yunpan01/redmine:/usr/src/redmine/files --name redmine redmine:latestvi /opt/yunpan01/redmine/configuration.yml

same step as above to key in the configuration.yml

  default:      email_delivery:        delivery_method: :smtp        smtp_settings:          address: "smtp.yourcompany.com"          port: 25

now you can make a file link in container

docker exec redmine ln -s \/usr/src/redmine/files/configuration.yml\ /usr/src/redmine/config/configuration.yml


It seems that redmine official image do not provide this kind of configurations.

You may want to try sameersbn/redmine or bitnami/redmine


  1. Enter into container by sudo docker exec -i -t /bin/bash
  2. copy or rename /usr/src/redmine/config/configuration.yml.example in /usr/src/redmine/config/configuration.yml
  3. map this file in a volumeredmine: image: redmine ports: - "8089:3000" volumes: - '/home/ubuntu/docker/redmine/allfiles:/usr/src/redmine/files' - '/home/ubuntu/docker/redmine/configuration.yml:/usr/src/redmine/config/configuration.yml'
  4. Set email configuration on this file, as explained here