docs: Update `compose.yaml` for `dovecot-solr` guide (#4099)

The `image` field is used for the default tag, if it's not specified Compose will infer one in addition to any extra `tags` provided.

Better to use `image` for the tag assignment, and a clear `pull_policy` to prevent trying to pull a remote image of the same name.
This commit is contained in:
Brennan Kinney 2024-07-05 23:48:42 +12:00 committed by GitHub
parent 9175424d0f
commit 2d12bbb7fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -43,11 +43,12 @@ As the official DMS image does not provide `dovecot-solr`, you'll need to includ
services: services:
mailserver: mailserver:
hostname: mail.example.com hostname: mail.example.com
# Do not use `image` anymore, unless referring to the tagged image build below # The `image` setting now represents the tag for the local build configured below:
image: local/dms:14.0
# Local build (no need to try pull `image` remotely):
pull_policy: build
# Add this `build` section to your real `compose.yaml` for your DMS service: # Add this `build` section to your real `compose.yaml` for your DMS service:
build: build:
tags:
- local/dms:14.0
dockerfile_inline: | dockerfile_inline: |
FROM docker.io/mailserver/docker-mailserver:14.0 FROM docker.io/mailserver/docker-mailserver:14.0
RUN apt-get update && apt-get install dovecot-solr RUN apt-get update && apt-get install dovecot-solr