mailcow-dockerized icon indicating copy to clipboard operation
mailcow-dockerized copied to clipboard

update.sh is broken since docker-compose v2 requirement

Open domrim opened this issue 2 years ago • 8 comments

Contribution guidelines

I've found a bug and checked that ...

  • [X] ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
  • [X] ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
  • [X] ... I have understood that answers are voluntary and community-driven, and not commercial support.
  • [X] ... I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description

Since the requirement of docker-compose v2 (which came way earlier than December 2022, but that's another topic) the update.sh script is broken. It tries to call docker-compose but this executable doesn't exist anymore with docker-compose v2. This only works if you have also installed compose-switch.

I believe this was introduced with the commit 7166696aa2682617836c254e9243a3120a9243d0 by @DerLinkman

Steps to reproduce

root@host:/opt/mailcow-dockerized# ./update.sh
Cannot find docker-compose Standalone.
Please install it manually regarding to this doc site: https://mailcow.github.io/mailcow-dockerized-docs/i_u_m/i_u_m_install/

System information

Question Answer
My operating system Debian 11
Is Apparmor, SELinux or similar active? apparmor
Virtualization technology (KVM, VMware, Xen, etc - LXC and OpenVZ are not supported KVM
Server/VM specifications (Memory, CPU Cores) 2 Cores, 4GB Ram
Docker version (docker version) 20.10.17
docker-compose version (docker-compose version) 2.6.0
mailcow version (git describe --tags `git rev-list --tags --max-count=1` ) 2022-07
Reverse proxy (custom solution) no

domrim avatar Jul 23 '22 12:07 domrim

Small update:

I just read your installation guide for docker-compose and understand now, that the script should work if one installed docker-compose like you want it. Why do you diverge here from the recommended method from docker?

domrim avatar Jul 23 '22 12:07 domrim

It´s done due to some internal mailcow Operations.

Some users still use docker-compose and not docker compose for some reasons like several OS Types.

We´ve used the docker-compose Version as standalone before so we´ll continue that.

DerLinkman avatar Jul 23 '22 13:07 DerLinkman

It´s done due to some internal mailcow Operations.

Some users still use docker-compose and not docker compose for some reasons like several OS Types.

We´ve used the docker-compose Version as standalone before so we´ll continue that.

That makes very little sense especially since most people will follow the docker install standards which makes docker-compose invalid... The documentation therefore is also not correct and people will fail to use mailcow..

Not sure you want that as a mailcow contributor, right? At least provide some info to still be able to generate the conifg file or setup mailcow..

Anyways, not a big problem for me... it is deleting a couple of lines from the script file to make it work

jpeaglesandkatz avatar Jul 23 '22 16:07 jpeaglesandkatz

You can always contribute to the project if there is something which bothers you 😊👍 It's a open source project for anyone to contribute.

DerLinkman avatar Jul 23 '22 18:07 DerLinkman

You can always contribute to the project if there is something which bothers you 😊👍 It's a open source project for anyone to contribute.

I apologise if my comment appeared harsh or rude in any way.. I'm extremely grateful for the incredible work you guys are doing. Not sure there is anything I can really contribute with but I'll give it some thought :)

jpeaglesandkatz avatar Jul 23 '22 18:07 jpeaglesandkatz

There is some background context that can be found to this in this issue and also in this one.

chriscroome avatar Jul 23 '22 21:07 chriscroome

@domrim @SubsterNL My workaround for this issue is to install docker-compose according to the official instructions from Docker and then create a file /usr/local/bin/docker-compose with the following content:

#!/bin/bash

docker compose "$@"

ghost avatar Jul 29 '22 03:07 ghost

@domrim @SubsterNL My workaround for this issue is to install docker-compose according to the official instructions from Docker and then create a file /usr/local/bin/docker-compose with the following content:

#!/bin/bash

docker compose "$@"
chmod +x /usr/local/bin/docker-compose

For people who are not quite so fit

Psycho0verload avatar Aug 02 '22 15:08 Psycho0verload

Plus +1 this issue.

FYI the official Docker workaround is to install compose-switch for environments that still require the old path.. https://github.com/docker/compose-switch

ghost avatar Aug 15 '22 16:08 ghost

Will probably take a look how to use both types so with and without - in the update.sh script during the next days.

DerLinkman avatar Aug 15 '22 16:08 DerLinkman

I'll close this since https://github.com/mailcow/mailcow-dockerized/pull/4725 got merged/superseeded by https://github.com/mailcow/mailcow-dockerized/pull/4723 and available in the latest update (2022-08)

MAGICCC avatar Sep 01 '22 13:09 MAGICCC