wardenenv/warden

[Command] warden env start

Closed this issue ยท 14 comments

Version of Warden

in-dev (commit 6f650ec)

Operating System and Installation Method

Ubuntu 20.04.6 LTS, docker ce 25.0.0, installed using "Alternative Installation" from https://docs.warden.dev/installing.html#alternative-installation

Describe the Bug

Started to happen on docker ce version 25.0.0:

$ warden env start
validating /opt/warden/environments/includes/varnish.base.yml: services.nginx.labels array items[2,7] must be unique

what helps is to downgrade docker-compose-plugin from version 2.24.1-1~ubuntu.20.04~focal to version 2.21.0-1~ubuntu.20.04~focal (or downgrade whole docker from 25.0.0 to 24.0.7)

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

No response

Additional context

No response

Some more info in #740

So if I interpret the issues linked by @pczerkas correctly, this problem should be fixed in the next version of docker compose is released, and is not an issue with Warden at all.

BTW commenting out the last two labels in the varnish.base.yml service definition is an effective workaround if you do not feel like downgrading docker compose.

BTW commenting out the last two labels in the varnish.base.yml service definition is an effective workaround if you do not feel like downgrading docker compose.

It didn't work for me

Quick fix sometimes doesn't work when there are customizations in .warden directory.

I removed the whole file (/home/linuxbrew/.linuxbrew/Cellar/warden/0.14.1/environments/includes/varnish.base.yml) and it worked

Removing the file is certainly effective, but personally I'd maybe not recommend it, as it will probably break other things.

Looks like the issue will be fixed in the latest version of docker compose (v2.24.4). (Did not test, as that version does not yet seem to be available in the apt repo.)

I can confirm that after manual upgrade docker-compose-plugin to 2.24.4, the issue is gone.

However, for those who use Docker Desktop for Mac, it's automatically replaces the docker compose plugin when you restarting it, which isn't good.
The workaround for Mac is downgrading Docker Desktop to version 4.26.1

So I would summarize:

  • For those on Mac - downgrade Docker Desktop to Docker Desktop to version 4.26.1
  • For those on other OS:
    - upgrade docker-compose-plugin to latest version (at least to 2.24.4) if it's available
    - downgrade to version below 2.24.1

Work around for ubuntu while apt version is still behind. Should be a simple case of removing the profile export once the apt version is back up to date

VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')
DESTINATION=/usr/local/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION
echo "export DOCKER_COMPOSE_COMMAND=\"$DESTINATION\"" >> ~/.profile

Any update here? how I can properly fix my project from last two days its not working ?

@hassanas There are multiple workarounds in the thread. It's not an issue in Warden, but in docker compose.

Until there's an official release of the fixed docker compose version for your platform/installation method of choice, any of the workarounds should suffice.

Just confirming that the latest Ubuntu release of docker-compose-plugin (2.24.5-1~ubuntu.22.04~jammy) has fixed this issue for me.

Yes issue resolved on updating to new version:-

hassan@hassan-Creator-15-A10SFS:~$ docker compose version
Docker Compose version v2.24.2

hassan@hassan-Creator-15-A10SFS:~$ docker compose version
Docker Compose version v2.24.5

please close this issue.