Currently, we rely on Debian to pick a UID and GID for daemon users.
However, those numbers can change as software evolves over time, in
particular as the base distribution changes.
Because those IDs are relevant in the data volume, which has a lifetime
independent from the daemon container, it is important that they don't
change.
Other projects have run into this issue over the years too, this is not
a purely theoretical concern.
This patch fixes the UID/GIDs for the daemon users to their current
values, to prevent problems in the future.
See https://github.com/albertito/chasquid/pull/72 for further
discussion.
Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
Adjusted commit message, formatted RUN command line, changed the
dovecot group ID to match the previous value.
Using the "slim" version of the debian:stable image helps reduce size,
while having no impact on runtime usability or performance. The main
differences are around locale and manpages.
Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
Adjusted commit message.
From the Dockerfile docs:
> Environment variable persistence can cause unexpected side effects.
> For example, setting ENV DEBIAN_FRONTEND=noninteractive changes the
> behavior of apt-get, and may confuse users of your image.
>
> If an environment variable is only needed during build, and not in the
> final image, consider setting a value for a single command instead.
So this patch adjusts the use of the DEBIAN_FRONTEND variable to match
the documented best practice.
https://github.com/albertito/chasquid/pull/68
Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
Adjusted commit message.
This patch fixes some Dockerfile style warnings:
- `WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match`
- `LegacyKeyValueFormat: "ENV key=value" should be used instead of
legacy "ENV key value" format`
https://github.com/albertito/chasquid/pull/68
Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
Adjusted commit message.
When creating containers to run a single one-off command that alters a
volume, the `--rm` option is needed, otherwise that container is left
around and can cause confusion later on.
https://github.com/albertito/chasquid/pull/69
Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
Adjusted commit message.
When using git on Windows, git may try to "fix" line endings to CRLF.
Then, when building the Docker image, the files copied can end up having
the wrong line ending, which causes scripts to fail to run.
This patch fixes the problem by using .gitattributes to indicate to git
which line ending to use for the files in the docker/ directory.
https://github.com/albertito/chasquid/pull/66
Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
Adjusted commit message, extended comment on .gitattributes.