mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.75k stars 1.17k forks source link

The Compose file './docker-compose.yml' is invalid #4648

Closed powerbsd closed 1 year ago

powerbsd commented 2 years ago

Contribution guidelines

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

Description

ERROR: The Compose file './docker-compose.yml' is invalid because: services.nginx-mailcow.ports is invalid: Invalid port ":443:443", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol] services.nginx-mailcow.ports is invalid: Invalid port ":8080:8080", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]

Logs

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.nginx-mailcow.ports is invalid: Invalid port ":443:443", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.nginx-mailcow.ports is invalid: Invalid port ":8080:8080", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]

Steps to reproduce

  1. git pull 2../update.sh

System information

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

Output of git diff origin/master, any other changes to the code? If so, please post them:

YOUR OUTPUT GOES HERE

All third-party firewalls and custom iptables rules are unsupported. Please check the Docker docs about how to use Docker with your own ruleset. Nevertheless, iptabels output can help us to help you: iptables -L -vn:

Chain INPUT (policy ACCEPT 35066 packets, 39M bytes)
 pkts bytes target     prot opt in     out     source               destination
  51M   59G MAILCOW    all  --  *      *       0.0.0.0/0            0.0.0.0/0
   63  2545 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:25
  51M 6015M ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:18388

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
  79M   34G MAILCOW    all  --  *      *       0.0.0.0/0            0.0.0.0/0
  79M   34G DOCKER-USER  all  --  *      *       0.0.0.0/0            0.0.0.0/0
  79M   34G DOCKER-ISOLATION-STAGE-1  all  --  *      *       0.0.0.0/0            0.0.0.0/0
  36M 9857M ACCEPT     all  --  *      br-mailcow  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
3614K  228M DOCKER     all  --  *      br-mailcow  0.0.0.0/0            0.0.0.0/0
2385K  362M ACCEPT     all  --  br-mailcow !br-mailcow  0.0.0.0/0            0.0.0.0/0
3552K  225M ACCEPT     all  --  br-mailcow br-mailcow  0.0.0.0/0            0.0.0.0/0
  36M   33G ACCEPT     all  --  *      docker0  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
2894K  141M DOCKER     all  --  *      docker0  0.0.0.0/0            0.0.0.0/0
  51M   35G ACCEPT     all  --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0
    3   180 ACCEPT     all  --  docker0 docker0  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  *      br-fa1cd97ce71b  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 DOCKER     all  --  *      br-fa1cd97ce71b  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  br-fa1cd97ce71b !br-fa1cd97ce71b  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  br-fa1cd97ce71b br-fa1cd97ce71b  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  *      br-98bf5e426461  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 DOCKER     all  --  *      br-98bf5e426461  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  br-98bf5e426461 !br-98bf5e426461  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  br-98bf5e426461 br-98bf5e426461  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 68466 packets, 70M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain DOCKER (4 references)
 pkts bytes target     prot opt in     out     source               destination
  476 27630 ACCEPT     udp  --  !docker0 docker0  0.0.0.0/0            172.17.0.2           udp dpt:1194
    0     0 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.249         tcp dpt:6379
    0     0 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.2           tcp dpt:8983
    0     0 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.8           tcp dpt:3306
    0     0 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.250         tcp dpt:12345
    0     0 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.250         tcp dpt:4190
 8035  419K ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.253         tcp dpt:587
  902 51300 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.250         tcp dpt:995
 1509 87148 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.253         tcp dpt:465
  981 56028 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.250         tcp dpt:993
34917 1782K ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.253         tcp dpt:25
  625 34636 ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.250         tcp dpt:143
 2440  143K ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.250         tcp dpt:110
 3223  166K ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.10          tcp dpt:8080
 8720  484K ACCEPT     tcp  --  !br-mailcow br-mailcow  0.0.0.0/0            172.22.1.10          tcp dpt:443
1857K   90M ACCEPT     tcp  --  !docker0 docker0  0.0.0.0/0            172.17.0.4           tcp dpt:80

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
 pkts bytes target     prot opt in     out     source               destination
2397K  363M DOCKER-ISOLATION-STAGE-2  all  --  br-mailcow !br-mailcow  0.0.0.0/0            0.0.0.0/0
  51M   35G DOCKER-ISOLATION-STAGE-2  all  --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0
 168M   84G RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-2 (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      br-mailcow  0.0.0.0/0            0.0.0.0/0
11788  707K DROP       all  --  *      docker0  0.0.0.0/0            0.0.0.0/0
  56M   35G RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-USER (1 references)
 pkts bytes target     prot opt in     out     source               destination
 203M  109G RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain MAILCOW (2 references)
 pkts bytes target     prot opt in     out     source               destination

ip6tables -L -vn:

YOUR OUTPUT GOES HERE

iptables -L -vn -t nat:

YOUR OUTPUT GOES HERE

ip6tables -L -vn -t nat:

YOUR OUTPUT GOES HERE

DNS problems? Please run docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254 (set the IP accordingly, if you changed the internal mailcow network) and post the output:

YOUR OUTPUT GOES HERE
DerLinkman commented 2 years ago

Can you do a docker-compose version in here?

DerLinkman commented 2 years ago

And it would be nice if you gave us some system informations.

svengo commented 2 years ago

I'm getting a similar error:


sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo ./update.sh
Checking internet connection... OK
Checking for newer update script...
Updated 0 paths from e46f42fe
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y
Great! Native IPv6 NAT is active.
Fetching new docker-compose version...
Trying to determine GLIBC version...
Validating docker-compose stack configuration...
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object
services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

Oh no, something went wrong. Please check the error message above.
sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo docker compose version
Docker Compose version v2.6.0
sven@docker-prod02:/srv/docker/mailcow-dockerized$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"
sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo grep ^HTTP mailcow.conf
HTTP_PORT=80
HTTP_BIND=
HTTPS_PORT=443
HTTPS_BIND=```
DerLinkman commented 2 years ago

I see, but can you do a docker-compose version? Important with the - here

svengo commented 2 years ago

I see, but can you do a docker-compose version? Important with the - here

No problem:

sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
sven@docker-prod02:/srv/docker/mailcow-dockerized$ ls -l `which docker-compose`
-rwxr-xr-x 1 root root 215 Jun  6 20:51 /usr/local/bin/docker-compose
DerLinkman commented 2 years ago

Ok, in normal cases the update.sh script should update your docker-compose Version. That is the reason why its throwing out this issue.

Can you do a git diff origin/master update.sh please?

svengo commented 2 years ago

Can you do a git diff origin/master update.sh please?

No differences.

sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo git diff origin/master update.sh
sven@docker-prod02:/srv/docker/mailcow-dockerized$
chriscroome commented 2 years ago

Perhaps check the location of docker-compose and your $PATH

sudo -i
which docker-compose
echo $PATH
DerLinkman commented 2 years ago

Can you run the update.sh Script as root not via sudo?

andryyy commented 2 years ago

And don't use sudo update.sh or even try to control mailcow with it.

The environment may not be the same as it is for root if you "misuse" sudo. Some important variables or aliases you may have set are not always inherited into the child process.

DerLinkman commented 2 years ago

I see, but can you do a docker-compose version? Important with the - here

No problem:

sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
sven@docker-prod02:/srv/docker/mailcow-dockerized$ ls -l `which docker-compose`
-rwxr-xr-x 1 root root 215 Jun  6 20:51 /usr/local/bin/docker-compose

Try this please:

curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
svengo commented 2 years ago
curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Thank you! That solved the problem. Strange, I don't remember doing anything with docker-compose lately.

jol64 commented 2 years ago

I ran into the same issue, and upgrading docker-compose as above solved it. Looks like upgrade of docker-compose is mandatory already now.

GSchuemann commented 2 years ago

I ran into a similiar issue today:

ERROR: The Compose file './docker-compose.yml' is invalid because: services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

I am using ubuntu 22.04 with docker installed as a snap. I also tried "the edge" version:

$docker-compose --version docker-compose version 1.29.2, build unknown`

I was able to solve this issue by reverting a139eb9bce925e66a99639efd4b1027e020ac26a. I remembered, that it was working perfectly fine with the same setup a few weeks ago so I just checked what changed in the file, with git log.

Edit: the output of:

$ docker compose version Docker Compose version v2.5.0

svengo commented 2 years ago

I don't think it's a good idea to mix Docker Compose version 1 and 2. When calling docker-compose version 1 should be used when calling docker compose version 2. Just my 2 cents.

DerLinkman commented 2 years ago

We dont mix things up. It is still docker-compose. Its downloads (currently 2.6.0) from the update.sh Script since it is now used for mailcow to operate the whole stack.

DerLinkman commented 2 years ago

I ran into a similiar issue today:

ERROR: The Compose file './docker-compose.yml' is invalid because: services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

I am using ubuntu 22.04 with docker installed as a snap. I also tried "the edge" version:

$docker-compose --version docker-compose version 1.29.2, build unknown`

I was able to solve this issue by reverting a139eb9. I remembered, that it was working perfectly fine with the same setup a few weeks ago so I just checked what changed in the file, with git log.

Edit: the output of:

$ docker compose version Docker Compose version v2.5.0

The update process includes a update of the docker-compose Version. It works on all tested machines and all of the Telegram Users. How did you run the Update Script?

jol64 commented 2 years ago

How did you run the Update Script?

sudo su cd /opt/mailcow-dockerized ./update.sh

vprouza commented 2 years ago

Tried to update today. I have got the same issue.

cd /opt/mailcow-dockerized
./update.sh
./update.sh

and this is the output

Checking internet connection... OK
Checking for newer update script...
Updated 0 paths from cedcf9b9
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y
Great! Native IPv6 NAT is active.
Fetching new docker-compose version...
Trying to determine GLIBC version...
Validating docker-compose stack configuration...
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object
services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

Oh no, something went wrong. Please check the error message above.

Two different machines. docker-compose version 1.29.2

dsteinkopf commented 2 years ago

services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

I also had this error. But after setting HTTP_BIND and HTTPS_BIND in .env to an IP, this disappeared. I don't know if this is expected, too.

vprouza commented 2 years ago

I have fixed that by uninstalling docker-compose installed from pip. Letting the mailcow ./update.sh script install the newest one.

mintalicious commented 2 years ago

I have fixed that by uninstalling docker-compose installed from pip. Letting the mailcow ./update.sh script install the newest one.

Solved it for me, too.

chriscroome commented 2 years ago

This comment would have been more appropriate on another thread, but I'm unable to post there so I'm posting this here.

What I don't understand is that now that the docker-compose-plugin is available via apt, from the same repo as containerd.io and docker-ce, why isn't Mailcow simply installing it via:

apt install docker-compose-plugin

And then using it via the new syntax, eg:

docker compose --help

Usage:  docker compose [OPTIONS] COMMAND

Docker Compose

Options:
      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --env-file string            Specify an alternate environment file.
  -f, --file stringArray           Compose configuration files
      --profile stringArray        Specify a profile to enable
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the, first specified, Compose file)
  -p, --project-name string        Project name

Commands:
  build       Build or rebuild services
  convert     Converts the compose file to platform's canonical format
  cp          Copy files/folders between a service container and the local filesystem
  create      Creates containers for a service.
  down        Stop and remove containers, networks
  events      Receive real time events from containers.
  exec        Execute a command in a running container.
  images      List images used by the created containers
  kill        Force stop service containers.
  logs        View output from containers
  ls          List running compose projects
  pause       Pause services
  port        Print the public port for a port binding.
  ps          List containers
  pull        Pull service images
  push        Push service images
  restart     Restart containers
  rm          Removes stopped service containers
  run         Run a one-off command on a service.
  start       Start services
  stop        Stop services
  top         Display the running processes
  unpause     Unpause services
  up          Create and start containers
  version     Show the Docker Compose version information

Run 'docker compose COMMAND --help' for more information on a command.
mintalicious commented 2 years ago

Wouldn't work in my case - using CentOS not Ubuntu/Debian.

chriscroome commented 2 years ago

@mintalicious how do you install docker-ce? If you use yum I don't see why you couldn't install it from the Docker repo since it is available? See the instructions for configuring the repo.

mintalicious commented 2 years ago

I didn't know that mailcow differentiates between the unique operating system families for installing and upgrading its services in containers.

chriscroome commented 2 years ago

@mintalicious it doesn't, but Docker Compose isn't installed into a container and Mailcow doesn't install docker-ce... and since docker-compose-plugin can be now installed and upgraded using the same method as used for docker-ce (apt or yum or whatever) it would seem sensible to me to simply remove docker-compose version 1.x and ask users to install docker-compose-plugin using the same method as they use for docker-ce :man_shrugging:.

mintalicious commented 2 years ago

But it upgrades docker-compose.

chriscroome commented 2 years ago

I know but I'm suggesting that we could use the same method for installing and upgrading docker-compose-plugin as we use for docker-ce and this would save having to have any Mailcow code for installing / upgrading Docker Compose -- it would simply need to check that the plugin is installed.

Of course there could be future issues with upstream incompatibilities with new versions, but this is already the case for docker-ce and other things that Mailcow depends on...

mintalicious commented 2 years ago

@mintalicious it doesn't, but it also doesn't install docker-ce... and since docker-compose-plugin can be now installed and upgraded using the same method (apt or yum or whatever) it would seem sensible to me to simply remove docker-compose version 1.x and ask users to install docker-compose-plugin using the same method as they use for docker-ce man_shrugging.

I understand your point using docker-compose from the system's package (which would actually work for me), but maybe there are users who don't do a system upgrade periodically or even before every mailcow update. And mailcow must check and ensure that it can use at least the docker-compose version it requires.

chriscroome commented 2 years ago

A Mailcow check for the version:

docker compose version
Docker Compose version v2.6.0

And then Mailcow refusing to do anything if the version is not the minimum required would be fine as far as I'm concerned, in fact I think it would be good to prompt "users who don't do a system upgrade periodically" to update things!

mvdkleijn commented 2 years ago

Just to chime in out of nowhere... as long as there is no bleeding edge requirement, a little prod to update to a more recent one can't harm too much right? Although I do feel Mailcow shouldn't force / require an update unless it requires a feature or bugfix from a newer Docker compose to work reliably.

chriscroome commented 2 years ago

It is perhaps worth noting that the Mailcow install instructions contain the suggestion that the Docker install script should be used to install docker-ce:

curl -sSL https://get.docker.com/ | CHANNEL=stable sh

And the script that is served at that URL contains code to automatically install the docker-compose-plugin if the version of Docker is greater than 20.10 (the latest is 20.10.17).

And the statement that:

Package managers (e.g. apt, yum) likely won't give you the correct version.

Is probably no longer true, as long as the docker-compose-plugin package is installed using a package manager or the current Docker install.sh script.

DerLinkman commented 2 years ago

Yeah it has been done due to several reasons:

  1. People does not update their systems regularly
  2. Docker Compose v2 is kinda new in comparison to the v1 Version which can cause incompatibilities.
  3. We wan´t to test the Compose Version prior to ensure everything works, so we controll the Version mailcow runs with.
  4. Mailcow uses these docker-compose Commands for internal operations and Scripts as well (e.g Backup, Cold Standby etc.) and we want to ensure that these will work in all cases (not depending on which way you installed compose v2)

However if you want feel free to open up a PR which includes a check for the Repo Version of Compose v2.

Stelliferrous commented 2 years ago

Chiming in as an Alpine user, this wasn't very smooth as even Alpine edge only has 1.29.2-r2 and pip didn't work for me either.

For anyone else reading this: I removed docker-compose, re-added the dependencies, and manually grabbed the standalone from docker.

apk del docker-compose
apk add py3-cached-property py3-chardet py3-distro py3-dockerpty docker-py dockerpy-creds py3-docopt py3-ipaddress py3-jsonschema py3-pyrsistent py3-attrs py3-paramiko py3-asn1 py3-cryptography py3-bcrypt py3-pynacl py3-cffi py3-cparser py3-pysocks py3-dotenv py3-yaml py3-requests py3-certifi py3-charset-normalizer py3-idna py3-urllib3 py3-texttable py3-websocket-client yaml
curl -SL https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

./update.sh worked after that and everything is showing up and running.

rothamel commented 2 years ago

I ran into a similiar issue today:

ERROR: The Compose file './docker-compose.yml' is invalid because: services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

I am using ubuntu 22.04 with docker installed as a snap. I also tried "the edge" version:

$docker-compose --version docker-compose version 1.29.2, build unknown`

I was able to solve this issue by reverting a139eb9. I remembered, that it was working perfectly fine with the same setup a few weeks ago so I just checked what changed in the file, with git log. Edit: the output of:

$ docker compose version Docker Compose version v2.5.0

The update process includes a update of the docker-compose Version. It works on all tested machines and all of the Telegram Users. How did you run the Update Script?

Same problem that it doesn't work on a actual OpenSuse Leap installation where docker-compose is taken from openSuse repos. Interesting is, that no error message tells that an installation of docker-compose had a problem.

I'm quite surprised to hear that this mailserver update tries to update basic components of a container machine without any notice before. In my opinion it is not really an ideal way to update such a component by the update process of an application. The component might be used by other containers of a machine. A hint that an update is necessary or additionally a question "do you want to update the docker-compose too" could be a more suitable way...

DerLinkman commented 2 years ago

A hint that an update is necessary or additionally a question "do you want to update the docker-compose too" could be a more suitable way...

I´m implementing it already to the update.sh script. It even detects if your version is up to date so it won´t ask you everytime if there isn´t a new version available.

rothamel commented 2 years ago

I´m implementing it already to the update.sh script. It even detects if your version is up to date so it won´t ask you everytime if there isn´t a new version available.

Sounds nice. Does this new version ask you for an update of docker-compose or does it try an update by itself?

DerLinkman commented 2 years ago

Both, if you set: Yes it will update it by it self. If you press No then it won´t update.

milkmaker commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

kwiniarski97 commented 2 years ago

Bumping, as it's not resolved.

DerLinkman commented 2 years ago

Which docker compose Version do you have?

milkmaker commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

1fexd commented 1 year ago

I see, but can you do a docker-compose version? Important with the - here

No problem:

sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
sven@docker-prod02:/srv/docker/mailcow-dockerized$ ls -l `which docker-compose`
-rwxr-xr-x 1 root root 215 Jun  6 20:51 /usr/local/bin/docker-compose

Try this please:

curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

That fixed it for me, even though I had to run the nested command seperately

yousefamar commented 1 year ago

Thanks a lot @DerLinkman!

I had this issue on a fresh install on Debian 11, using the official mailcow ansible role. I adapted your commands to an ansible task.

  pre_tasks:
    - name: Fix for mailcow issue (https://github.com/mailcow/mailcow-dockerized/issues/4648#issuecomment-1165816047)
      shell: |
        curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
        chmod +x /usr/local/bin/docker-compose

The whole thing seems quite fragile, but it solves my issue for now!

mrehanahmed commented 11 months ago

I see, but can you do a docker-compose version? Important with the - here

No problem:

sven@docker-prod02:/srv/docker/mailcow-dockerized$ sudo docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
sven@docker-prod02:/srv/docker/mailcow-dockerized$ ls -l `which docker-compose`
-rwxr-xr-x 1 root root 215 Jun  6 20:51 /usr/local/bin/docker-compose

Try this please:

curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

docker-compose did not upgrade with apt update. and then with the sudo ubuntu account did not execute this line. I had to su - to root and update docker compose and then it was like "It works!"

mrehanahmed commented 11 months ago

Thanks