Hello there and happy new year,

I have a question/request regarding the Docker Image hosted at 
https://hub.docker.com/r/dovecot/dovecot.
The Dockerfile itself declares two volumes:

- `/etc/dovecot` for configuration data
- `/srv/mail` for mail storage

It seems inconvenient in some cases to have the image create these volumes, 
especially in case of the former.

Consider a minimal Dockerfile like the following:

```
FROM dovecot/dovecot:latest
COPY dovecot.conf /etc/dovecot/dovecot.conf
```

This creates a new image building on top of the official one,
which has statically configured configuration, and thus does not need to save 
its config in a volume.
Yet currently, since the base image exports volumes, a config volume is created.

A user might also choose to save mail in a different directory or even in a 
remote SQL database, rendering the second volume unnecessary.

I would like to know a bit about the reasons for declaring the volumes,
and suggest removing the line, should this be an option.

Some impact considerations:

- Removing the volumes for future image versions will not impact existing 
deployments building on tags other than `latest`.
- As the default (example) configuration is not very useful for 
non-test-setups, most people have probably assigned the config volume 
explicitly, e.g. using docker's `-v` option. These people will also not be 
affected.
- The description explicitly states to mount `/srv/mail/`, but some people 
might rely on the the automatic volume creation nonetheless.
- Some obscure proprietary scripts may rely on the current behavior.

In any case, if the volumes are no longer declared, the image description 
should mention that the mail storage location (the default being `/var/mail`) 
must be saved e.g. by using volumes, and probably also that the configuration 
is expected at `/etc/dovecot/dovecot.conf`.

Stay healthy and have a nice day,

-- 
Thomas Bellebaum <[email protected]>

Attachment: pgpDsW2Vj41jQ.pgp
Description: PGP signature

Reply via email to