Skip to content

Commit 76eb879

Browse files
cmousesirainen
authored andcommitted
installation/docker: Improve documentation
1 parent 9ab3a3a commit 76eb879

File tree

2 files changed

+73
-8
lines changed

2 files changed

+73
-8
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
aarch
12
bitmask
23
bitmasks
34
configurations

docs/installation/docker.md

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,52 @@ order: 8
88

99
Dovecot CE comes with Docker images published at https://hub.docker.com/r/dovecot/dovecot.
1010

11+
## Image flavors
12+
13+
Currently we provide aarch64 and amd64 architecture for the images. There are three kinds of images:
14+
15+
Image naming follows pattern `<VERSION>{,-dev,-root}`, where version can be latest or exact published version.
16+
17+
Images are based on Debian slim image, distribution is occasionally upgraded when new versions are released.
18+
19+
### dovecot/dovecot:latest
20+
21+
This is a hardened rootless image, which runs everything as vmail user, and minimal amount of binaries installed. This image
22+
uses non-standard ports, see [Listening ports](#listening-ports) for more information.
23+
24+
Linux capability `CAP_SYS_CHROOT` is needed for the container, unless chrooting is disabled by placing `no-chroot.conf` drop-in to `conf.d`:
25+
26+
```doveconf
27+
service imap-login {
28+
chroot =
29+
}
30+
31+
service pop3-login {
32+
chroot =
33+
}
34+
35+
service submission-login {
36+
chroot =
37+
}
38+
39+
service managesieve-login {
40+
chroot =
41+
}
42+
43+
service imap-urlauth-login {
44+
chroot =
45+
}
46+
```
47+
48+
### dovecot/dovecot:latest-dev
49+
50+
This is the same as latest, but without hardening. It still runs rootless with vmail, and if you want to drop `CAP_SYS_CHROOT`, you still need to add the same configuration drop-in.
51+
52+
### dovecot/dovecot:latest-root
53+
54+
This image is suitable for running as root, which means there will be different users like `dovenull`, `dovecot` and `vmail` used.
55+
Also listening ports will be default ports, and not the non-privileged ones.
56+
1157
## Minimal setup
1258

1359
To run Dovecot you can start it with:
@@ -41,22 +87,40 @@ Example:
4187
docker run -v /etc/dovecot-config:/etc/dovecot/conf.d:ro -v /srv/vmail:/srv/vmail -p 143:31143 -p 993:31993 dovecot/dovecot:latest
4288
```
4389

44-
Dovecot uses TLS certificates from `/etc/dovecot/ssl` directory. The full chain certificate name is expected to be `tls.crt`, and key file `tls.key`.
45-
46-
POP3 service is not enabled by default, if you need pop3, place a pop3.conf drop-in to conf.d:
90+
POP3 service is not enabled by default, if you need pop3, place a `pop3.conf` drop-in to `conf.d`:
4791

48-
```
92+
```doveconf
4993
protocols {
5094
pop3 = yes
5195
}
5296
```
5397

5498
By default imap, submission, lmtp and sieve protocols are enabled.
5599

100+
### Authentication
101+
102+
The default auth configuration is in `conf.d/auth.conf`, which has
103+
```doveconf
104+
passdb static {
105+
password = $ENV:USER_PASSWORD
106+
}
107+
```
108+
109+
This is useful only for testing purposes and single-user instances. To configure multiple users or other authentication methods, you need to override this file.
110+
111+
### TLS configuration
112+
113+
Default certificate is expected at `/etc/dovecot/ssl/tls.crt` and key at `/etc/dovecot/ssl/tls.key`. You can override `conf.d/ssl.conf` to change this.
114+
115+
### Complex configuration
116+
117+
You can also override the entire `/etc/dovecot/dovecot.conf` file, just make sure you include `/etc/dovecot/vendor.d/rootless.conf` in your configuration either
118+
direcly, or with `!include` directive. This is not needed if you use the `-root` variant image.
119+
56120
## Listening ports
57121

58122
Since v2.4.1 ports are exposed as non-privileged ports. You need to map these
59-
to the ports that you need.
123+
to the ports that you need. For latest-root image, the ports are standard, and this does not apply.
60124

61125
### Exposed protocols
62126

@@ -65,7 +129,7 @@ to the ports that you need.
65129
| imap | 31143 |
66130
| imaps | 31993 |
67131
| pop3 | 31110 |
68-
| pop3s | 31990 |
132+
| pop3s | 31995 |
69133
| submissions | 31465 |
70134
| submission | 31587 |
71135
| lmtps | 31024 |
@@ -81,12 +145,12 @@ To run the system fully read-only, use:
81145
docker run --read-only --tmpfs /tmp --tmpfs /run/dovecot -v /srv/vmail:/srv/vmail --rm -it dovecot/dovecot:latest
82146
```
83147

84-
Dovecot will need write permissions to `/tmp`, `/run` and persistent mail storage at `/srv/vmail`.
148+
Dovecot will need write permissions to `/tmp`, `/run/dovecot` and persistent mail storage at `/srv/vmail`.
85149

86150
## Running without Linux capabilities
87151

88152
By default, Dovecot needs `CAP_SYS_CHROOT` capability. To remove this requirements, you can prevent chrooting
89-
by placing no-chroot.conf to drop-in directory:
153+
by placing no-chroot.conf to `conf.d` directory:
90154

91155
```
92156
service submission-login {

0 commit comments

Comments
 (0)