Mailu: Docker-compose : ERROR: Invalid interpolation format for "image" option in service ... after using setup utility

Created on 19 Jan 2019  Â·  13Comments  Â·  Source: Mailu/Mailu

Hello,

I just wanted to give a try with the brand new version of Mailu, and i generated a fresh docker-compose configuration trought the setup utility. After backing up my DB, i launched the preconized command in my shell and ... i've got a bunch of error. Googling didn't help me further.

Here's the trace :

vparres@oneill : ~/mailu $> docker-compose pull
docker-compose down --remove-orphans
docker-compose up
ERROR: Invalid interpolation format for "image" option in service "webdav": "${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-1.6}"
ERROR: Invalid interpolation format for "image" option in service "webdav": "${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-1.6}"
ERROR: Invalid interpolation format for "image" option in service "webdav": "${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-1.6}"

Did i made something wrong ?

Thanks !

Most helpful comment

Looking at https://github.com/Mailu/Mailu/graphs/traffic this page seems to be one of the most visited in our repository. Yet, we have not updated our documentation / faq to point out:

  • docker-compose shipped with ubuntu is too old
  • How to get a newer / proper version.

I'm reopening this because Ubuntu is the most popular and beginner friendly distribution. And the stats point out a lot of (new/inexperienced?) users are bitten by this. It is not a friendly welcome.

I would like the documentation, or FAQ, to be more clear around this subject in order to prevent novice users falling for this. Help is welcome.

All 13 comments

Hi,

I have toyed around a bit, but couldn’t reproduce your problem. It’d be great if you could provide some more information. What I can think of as being interesting right now would be:

  • docker-compose --version
  • if possible, your mailu.env (without secret/private parts), otherwise the 3 variables in the image line (DOCKER_ORG, DOCKER_PREFIX, MAILU_VERSION) as set in your mailu.env (just copy-paste a grep here ^_^)
  • your docker-compose.yml

I’m really a bit puzzled, the usual mistake that leads to ERROR: Invalid interpolation format is that there’s a $ in some string that was never meant to be a variable, and that needs to be escaped. But the very syntax used in your error works flawlessly here …hence my stab at the compose-version

Hi,

Here there are :

docker-compose version 1.17.1, build unknown

```sh

Mailu main configuration file

#

Generated for compose flavor

#

This file is autogenerated by the configuration management wizard.

For a detailed list of configuration variables, see the documentation at

https://mailu.io

#

Common configuration variables

#

Set this to the path where Mailu data and configuration is stored

This variable is now set directly in `docker-compose.yml by the setup utility

ROOT=REDACTED

Mailu version to run (1.0, 1.1, etc. or master)

VERSION=1.6

Set to a randomly generated 16 bytes string

SECRET_KEY=REDACTED

Address where listening ports should bind

This variables are now set directly in `docker-compose.yml by the setup utility

PUBLIC_IPV4= REDACTED

PUBLIC_IPV6= REDACTED

Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!)

SUBNET=192.168.203.0/24

Main mail domain

DOMAIN=REDACTED

Hostnames for this server, separated with comas

HOSTNAMES=REDACTED

Postmaster local part (will append the main mail domain)

POSTMASTER=admin

Choose how secure connections will behave (value: letsencrypt, cert, notls, mail, mail-letsencrypt)

TLS_FLAVOR=letsencrypt

Authentication rate limit (per source IP address)

AUTH_RATELIMIT=10/minute;1000/hour

Opt-out of statistics, replace with "True" to opt out

DISABLE_STATISTICS=False

#

Optional features

#

Expose the admin interface (value: true, false)

ADMIN=true

Choose which webmail to run if any (values: roundcube, rainloop, none)

WEBMAIL=none

Dav server implementation (value: radicale, none)

WEBDAV=radicale

Antivirus solution (value: clamav, none)

ANTIVIRUS=clamav

Antispam solution

ANTISPAM=none

#

Mail settings

#

Message size limit in bytes

Default: accept messages up to 50MB

Max attachment size will be 33% smaller

MESSAGE_SIZE_LIMIT=50000000

Networks granted relay permissions

Use this with care, all hosts in this networks will be able to send mail without authentication!

RELAYNETS=

Will relay all outgoing mails if configured

RELAYHOST=

Fetchmail delay

FETCHMAIL_DELAY=600

Recipient delimiter, character used to delimiter localpart from custom address part

RECIPIENT_DELIMITER=+

DMARC rua and ruf email

DMARC_RUA=admin
DMARC_RUF=admin

Welcome email, enable and set a topic and body if you wish to send welcome

emails to all users.

WELCOME=false
WELCOME_SUBJECT=Welcome to your new email account
WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly!

Maildir Compression

choose compression-method, default: none (value: bz2, gz)

COMPRESSION=

change compression-level, default: 6 (value: 1-9)

COMPRESSION_LEVEL=

#

Web settings

#

Path to redirect / to

WEBROOT_REDIRECT=/

Path to the admin interface if enabled

WEB_ADMIN=/

Path to the webmail if enabled

WEB_WEBMAIL=

Website name

SITENAME=REDACTED

Linked Website URL

WEBSITE=REDACTED

#

Advanced settings

#

Log driver for front service. Possible values:

json-file (default)

journald (On systemd platforms, useful for Fail2Ban integration)

syslog (Non systemd platforms, Fail2Ban integration. Disables docker-compose log for front!)

LOG_DRIVER=json-file

Docker-compose project name, this will prepended to containers names.

COMPOSE_PROJECT_NAME=merizelmail

Default password scheme used for newly created accounts and changed passwords

(value: BLF-CRYPT, SHA512-CRYPT, SHA256-CRYPT, MD5-CRYPT, CRYPT)

PASSWORD_SCHEME=BLF-CRYPT

Header to take the real ip from

REAL_IP_HEADER=

IPs for nginx set_real_ip_from (CIDR list separated by commas)

REAL_IP_FROM=

choose wether mailu bounces (no) or rejects (yes) mail when recipient is unknown (value: yes, no)

REJECT_UNLISTED_RECIPIENT=no

Log level threshold in start.py (value: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET)

LOG_LEVEL=WARNING

#

Database settings

#

DB_FLAVOR=sqlite

```yaml
# This file is auto-generated by the Mailu configuration wizard.
# Please read the documentation before attempting any change.
# Generated for compose flavor

version: '3.6'

services:

  # External dependencies
  redis:
    image: redis:alpine
    restart: always
    volumes:
      - "***REDACTED***/redis:/data"

  # Core services
  front:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    logging:
      driver: json-file
    ports:
      - "127.0.0.1:80:80"
      - "::1:80:80"
      - "127.0.0.1:443:443"
      - "::1:443:443"
      - "***REDACTED***:25:25"
      - "***REDACTED***:25:25"
      - "***REDACTED***:465"
      - "***REDACTED***:465:465"
      - "***REDACTED***7:587"
      - "***REDACTED***:587:587"
      - "***REDACTED***:110"
      - "***REDACTED***:110:110"
      - "***REDACTED***:995:995"
      - "***REDACTED***:995:995"
      - "***REDACTED***:143:143"
      - "***REDACTED***:143:143"
      - "***REDACTED***:993"
      - "***REDACTED***:993:993"
    volumes:
      - "***REDACTED***/certs:/certs"
      - "***REDACTED***/overrides/nginx:/overrides"

  resolver:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-1.6}
    env_file: mailu.env
    restart: always
    networks:
      default:
        ipv4_address: 192.168.203.254

  admin:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    volumes:
      - "***REDACTED***/data:/data"
      - "***REDACTED***/dkim:/dkim"
    depends_on:
      - redis

  imap:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    volumes:
      - "***REDACTED***/mail:/mail"
      - "***REDACTED***/overrides:/overrides"
    depends_on:
      - front

  smtp:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    volumes:
      - "***REDACTED***/overrides:/overrides"
    depends_on:
      - front
      - resolver
    dns:
      - 192.168.203.254

  antispam:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    volumes:
      - "***REDACTED***/filter:/var/lib/rspamd"
      - "***REDACTED***/dkim:/dkim"
      - "***REDACTED***/overrides/rspamd:/etc/rspamd/override.d"
    depends_on:
      - front
      - resolver
    dns:
      - 192.168.203.254

  # Optional services
  antivirus:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}clamav:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    volumes:
      - "***REDACTED***/filter:/data"
    depends_on:
      - resolver
    dns:
      - 192.168.203.254

  webdav:
    image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-1.6}
    restart: always
    env_file: mailu.env
    volumes:
      - "***REDACTED***/dav:/data"


  # Webmail


networks:
  default:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 192.168.203.0/24

I replaced any of my sensitive data with ***REDACTED***, so empty values are empty on my side as well :D

I hope it'll help !

Hi,

thanks for going all the way — I have just tried with the same docker-compose version that you use, and it fails with the exact same error. What I totally don’t get is why it fails specificially at radicale. Later compose versions (I believe from 1.19 on) check the version: at the top of the file.

Long story short: Could you update to the latest docker-compose, try again, and report back?

Thanks,
-Dario

Note that not all distributions are updating docker or docker-compose anymore. (like fedora is horribly outdated).

In that case it's better to uninstall docker-compose from the package manager and install the latest version from PyPi.

pip3 install docker-compose

On 20 January 2019 11:45:55 EET, Nebukadneza notifications@github.com wrote:

Hi,>
>
thanks for going all the way — I have just tried with the same
docker-compose version that you use, and it fails with the exact same
error. What I totally don’t get is why it fails specificially at
radicale. Later compose versions (I believe from 1.19 on) check the
version: at the top of the file.>
>
Long story short: Could you update to the latest docker-compose, try
again, and report back?>
>
Thanks,>
-Dario>
>
-- >
You are receiving this because you are subscribed to this thread.>
Reply to this email directly or view it on GitHub:>
https://github.com/Mailu/Mailu/issues/853#issuecomment-455851640

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Hi,

Sorry for being so long ! I was busy this week, with a lot of work to do.
I upgraded my docker-compose up to 1.21, and ... it worked great ! Mailu is up-to-date, and i had no other issues during upgrade.

I think its interesting to add a note into the doc to notice this.

Thanks for everything and congrats for your great work !

Hello I'm experiencing a similar issue with

docker-compose version 1.8.0, build unknown
docker-py version: 1.9.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018

First I downloaded the 1.6 later master and I got the same error:

docker-compose -p mailu up -d ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under theserviceskey, or omit theversionkey and place your service definitions at the root of the file to use version 1.

I tried to change the version of the file to 2.0 as suggested by the error but then I got:

docker-compose -p mailu up -d ERROR: Invalid interpolation format for "image" option in service "webdav": "${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-master}"

any ideas?

Hi,

your docker-compose is ~3 years old. I haven’t checked, but it’s likely the syntax isn’t supported yet by your old docker-compose. Please consider upgrading it …

oh thanks,
somehow I saw 18 instead of 1.8.
will update it now.

Hi there,
Unfortunately I'm experiencing the exact same issue on a fresh install of Ubuntu 18.04.02 (latest updates installed).
For Docker and docker-compose I use the versions directly from the docker repository.

docker-compose version 1.17.1
Docker version 18.09.5, build e8ff056

I've tried removing webdav from the docker-compose.yml it than just spits out the same error message from the service "admin".

If you need more info from me I'm happy to help.

Hi , i just regged on github to place a comment coz it was not clear to me how to solve this.

looks like mailu dockercompose generates a docker-compose.yml with version 3.6
checking the compat matrix at https://github.com/docker/compose/releases
you need at least docker engine 18.02.0+ . ubuntu has an outdated version.

to fix it on ubuntu 18.4 lts uninstall your docker-compose stuff , logout and login so the snap reference is gone in your shell session , then install docker-compose like https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04

dont forget to chmod +x /usr/local/bin/docker-compose

after that I get
Creating mailu_front_1 ... done
Creating mailu_webdav_1 ... done
Creating mailu_resolver_1 ... done
Creating mailu_redis_1 ... done
Creating mailu_imap_1 ... done
Creating mailu_webmail_1 ... done
Creating mailu_antivirus_1 ... done
Creating mailu_smtp_1 ... done
Creating mailu_antispam_1 ... done
Creating mailu_fetchmail_1 ... done
Creating mailu_admin_1 ... done
docker-mailu@mail2:/mailu$

Thanks for that link. I installed both Docker and docker-compose from the docker Ubuntu repository, which gave me these errors.
Fortunately after removing docker-compose and installing it through the link you posted solved the problem and made me install Mailu.
Thanks a lot.

Looking at https://github.com/Mailu/Mailu/graphs/traffic this page seems to be one of the most visited in our repository. Yet, we have not updated our documentation / faq to point out:

  • docker-compose shipped with ubuntu is too old
  • How to get a newer / proper version.

I'm reopening this because Ubuntu is the most popular and beginner friendly distribution. And the stats point out a lot of (new/inexperienced?) users are bitten by this. It is not a friendly welcome.

I would like the documentation, or FAQ, to be more clear around this subject in order to prevent novice users falling for this. Help is welcome.

I have the same issue and I am on Docker version 19.03.6, build 369ce74a3c

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Diman0 picture Diman0  Â·  3Comments

Thorsten1976 picture Thorsten1976  Â·  4Comments

hoellen picture hoellen  Â·  4Comments

micw picture micw  Â·  4Comments

whitef0x0 picture whitef0x0  Â·  4Comments