Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vparres opened this issue Jan 19, 2019 · 14 comments · Fixed by #1351

Comments

@vparres
Copy link
Contributor

vparres commented Jan 19, 2019

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 !

@Nebukadneza
Copy link
Member

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

@vparres
Copy link
Contributor Author

vparres commented Jan 19, 2019

Hi,

Here there are :

docker-compose version 1.17.1, build unknown
# 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
# 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 !

@Nebukadneza
Copy link
Member

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

@muhlemmer
Copy link
Member

muhlemmer commented Jan 23, 2019 via email

@vparres
Copy link
Contributor Author

vparres commented Jan 26, 2019

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 !

@vparres vparres closed this as completed Jan 26, 2019
@ghost
Copy link

ghost commented Mar 4, 2019

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 the serviceskey, or omit theversion key 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?

@Nebukadneza
Copy link
Member

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 …

@ghost
Copy link

ghost commented Mar 5, 2019

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

@ictinc
Copy link

ictinc commented Apr 25, 2019

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.

@YourBase4
Copy link

YourBase4 commented Apr 28, 2019

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$

@ictinc
Copy link

ictinc commented May 19, 2019

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.

@muhlemmer
Copy link
Member

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.

@muhlemmer muhlemmer reopened this Oct 14, 2019
@kaiyou kaiyou mentioned this issue Feb 7, 2020
2 tasks
bors bot added a commit that referenced this issue Feb 8, 2020
1351: Add some faq entries r=mergify[bot] a=kaiyou

## What type of PR?

Documentation

## What does this PR do?

Add missing faq entries

### Related issue(s)
- Closes: #853 
- Closes: #897 
- Closes: #1090 
- Closes: #1315

## Prerequistes
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [x] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file.


Co-authored-by: kaiyou <pierre@jaury.eu>
@bors bors bot closed this as completed in 770d09b Feb 8, 2020
@bors bors bot closed this as completed in #1351 Feb 8, 2020
@jbonnett92
Copy link

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

@liudaolunboluo
Copy link

I added version: '3.3' at the beginning of Docker Compose. yml, that's enough. My Docker Compose version is 1.26

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants